]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/kernel_sigaction.h
m68k: Fix sigaction kernel definition (BZ #23967)
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / kernel_sigaction.h
index d005cbce9848517502c3481e2df61f9bb236375c..1c36146d4616b902bc0acac1180e7b624194bb3c 100644 (file)
@@ -1,19 +1,28 @@
-/* This is the sigaction structure from the Linux 2.1.20 kernel.  */
+#ifndef _KERNEL_SIGACTION_H
+# define _KERNEL_SIGACTION_H
 
-#define HAVE_SA_RESTORER
+#ifdef SA_RESTORER
+# define HAS_SA_RESTORER 1
+#endif
 
-struct old_kernel_sigaction {
-       __sighandler_t k_sa_handler;
-       unsigned long sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer) (void);
+/* This is the sigaction structure from the Linux 3.2 kernel.  */
+struct kernel_sigaction
+{
+  __sighandler_t k_sa_handler;
+  unsigned long sa_flags;
+#ifdef HAS_SA_RESTORER
+  void (*sa_restorer) (void);
+#endif
+  /* glibc sigset is larger than kernel expected one, however sigaction
+     passes the kernel expected size on rt_sigaction syscall.  */
+  sigset_t sa_mask;
 };
 
-/* This is the sigaction structure from the Linux 2.1.68 kernel.  */
+#ifndef SET_SA_RESTORER
+# define SET_SA_RESTORER(kact, act)
+#endif
+#ifndef RESET_SA_RESTORER
+# define RESET_SA_RESTORER(act, kact)
+#endif
 
-struct kernel_sigaction {
-       __sighandler_t k_sa_handler;
-       unsigned long sa_flags;
-       void (*sa_restorer) (void);
-       sigset_t sa_mask;
-};
+#endif