summaryrefslogtreecommitdiff
path: root/udev_lib.h
diff options
context:
space:
mode:
authormbuesch@freenet.de <mbuesch@freenet.de>2004-10-13 22:38:15 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:55:39 -0700
commite5a5b54ab675988febeaa9cd831e21e675d5947b (patch)
treee965760484a7da1c81ce158140f00a2731096465 /udev_lib.h
parentdc117daa28c87c6be5846a23f06e16c2b6ff6bc1 (diff)
[PATCH] fix asmlinkage
This patch fixes the reintroduced bug with the sig_handler(), if we link against a -mregparm=3 compiled klibc on i386. It also fixes some compiler warnings about redefined asmlinkage on some systems. Also some (broken?) compilers on distros throw out warnings if asmlinkage is before "static void". This fixes it, too.
Diffstat (limited to 'udev_lib.h')
-rw-r--r--udev_lib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/udev_lib.h b/udev_lib.h
index 2f1965ea32..e9ff379fc6 100644
--- a/udev_lib.h
+++ b/udev_lib.h
@@ -65,6 +65,15 @@ do { \
pos = pos + len + strspn(pos, separator), len = strcspn(pos, separator)) \
if (len > 0)
+#ifdef asmlinkage
+# undef asmlinkage
+#endif
+#ifdef __i386__
+# define asmlinkage __attribute__((regparm(0)))
+#endif
+#ifndef asmlinkage
+# define asmlinkage /* nothing */
+#endif
extern char *get_action(void);
extern char *get_devpath(void);