summaryrefslogtreecommitdiff
path: root/include/linux/signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/signal.h')
-rw-r--r--include/linux/signal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 3fbe81444d31..639be264f5f9 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -28,6 +28,21 @@ struct sigpending {
sigset_t signal;
};
+#ifndef HAVE_ARCH_COPY_SIGINFO
+
+#include <linux/string.h>
+
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
+{
+ if (from->si_code < 0)
+ memcpy(to, from, sizeof(*to));
+ else
+ /* _sigchld is currently the largest know union member */
+ memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
+}
+
+#endif
+
/*
* Define some primitives to manipulate sigset_t.
*/