Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / include / linux / signal.h
index 561a128..ddd1e68 100644 (file)
@@ -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.
  */