aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--udev.c2
-rw-r--r--udev_lib.h9
-rw-r--r--udevd.c2
4 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4107b96a..4b8df139 100644
--- a/Makefile
+++ b/Makefile
@@ -112,7 +112,7 @@ OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>
# add -Wredundant-decls when libsysfs gets cleaned up
WARNINGS := -Wall
-CFLAGS := -pipe -Dasmlinkage=
+CFLAGS := -pipe
# set up the proper tdb spinlock code if we can
ifeq ($(strip $(ARCH)),i386)
diff --git a/udev.c b/udev.c
index 78da715f..94888d6a 100644
--- a/udev.c
+++ b/udev.c
@@ -58,7 +58,7 @@ void log_message(int level, const char *format, ...)
}
#endif
-asmlinkage static void sig_handler(int signum)
+static void asmlinkage sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
diff --git a/udev_lib.h b/udev_lib.h
index 2f1965ea..e9ff379f 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);
diff --git a/udevd.c b/udevd.c
index 380511d4..811f6224 100644
--- a/udevd.c
+++ b/udevd.c
@@ -309,7 +309,7 @@ skip:
return;
}
-asmlinkage static void sig_handler(int signum)
+static void asmlinkage sig_handler(int signum)
{
int rc;