? signalfd.patch
? signalfd2.patch
Index: signalfd01.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/signalfd/signalfd01.c,v
retrieving revision 1.4
diff -u -r1.4 signalfd01.c
--- signalfd01.c	11 Nov 2008 08:31:27 -0000	1.4
+++ signalfd01.c	12 Nov 2008 09:17:48 -0000
@@ -67,20 +67,6 @@
 #define  USE_STUB
 #endif
 
-#ifndef HAVE_SIGNALFD
-#include "linux_syscall_numbers.h"
-#ifndef __NR_signalfd
-#define __NR_signalfd 0
-#endif
-
-int
-signalfd(int fd, const sigset_t *mask, int flags)
-{
-  /* Taken from GLIBC. */
-  return (syscall(__NR_signalfd, fd, mask, _NSIG / 8));
-}
-#endif
-
 #if defined HAVE_SIGNALFD_SIGINFO_SSI_SIGNO
 #define LTP_SYSCALL_SIGNALFD_FIELD_PREFIX(FIELD) ssi_##FIELD
 #elif defined HAVE_SIGNALFD_SIGINFO_SIGNO
@@ -99,7 +85,20 @@
 }
 #else
 
+#ifndef HAVE_SIGNALFD
+#include "linux_syscall_numbers.h"
+#ifndef __NR_signalfd
+#define __NR_signalfd 0
+#endif
+
+int
+signalfd(int fd, const sigset_t *mask, int flags)
+{
+  /* Taken from GLIBC. */
+  return (syscall(__NR_signalfd, fd, mask, _NSIG / 8));
+}
+#endif
 
 void cleanup(void);
 void setup(void);
 
