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.
# 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)
}
#endif
-asmlinkage static void sig_handler(int signum)
+static void asmlinkage sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
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);
return;
}
-asmlinkage static void sig_handler(int signum)
+static void asmlinkage sig_handler(int signum)
{
int rc;