Commit cdf24f56 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] missing bit from signal patches

The following should allow the affected architectures to build in
2.5.19 as currently there will be two definitions of
copy_siginfo_to_user and if an architecture defines its own
siginfo_t it MUST define copy_siginfo().
parent e42d8b3e
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
......
#ifndef _CRIS_SIGINFO_H #ifndef _CRIS_SIGINFO_H
#define _CRIS_SIGINFO_H #define _CRIS_SIGINFO_H
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
#endif #endif
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _M68K_SIGINFO_H #define _M68K_SIGINFO_H
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
...@@ -68,6 +69,21 @@ typedef struct siginfo { ...@@ -68,6 +69,21 @@ typedef struct siginfo {
#define si_uid16 _sifields._kill._uid #define si_uid16 _sifields._kill._uid
#else #else
#define si_uid _sifields._kill._uid #define si_uid _sifields._kill._uid
#endif
#ifdef __KERNEL__
#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, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif #endif
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_SIGEVENT_T #define HAVE_ARCH_SIGEVENT_T
#define HAVE_ARCH_COPY_SIGINFO
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
...@@ -122,4 +122,19 @@ typedef struct sigevent { ...@@ -122,4 +122,19 @@ typedef struct sigevent {
} _sigev_un; } _sigev_un;
} sigevent_t; } sigevent_t;
#ifdef __KERNEL__
#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, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}
#endif
#endif /* _ASM_SIGINFO_H */ #endif /* _ASM_SIGINFO_H */
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_SIGEVENT_T #define HAVE_ARCH_SIGEVENT_T
#define HAVE_ARCH_COPY_SIGINFO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
...@@ -121,4 +123,19 @@ typedef struct sigevent { ...@@ -121,4 +123,19 @@ typedef struct sigevent {
} _sigev_un; } _sigev_un;
} sigevent_t; } sigevent_t;
#ifdef __KERNEL__
#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, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}
#endif
#endif /* _ASM_SIGINFO_H */ #endif /* _ASM_SIGINFO_H */
#ifndef _PARISC_SIGINFO_H #ifndef _PARISC_SIGINFO_H
#define _PARISC_SIGINFO_H #define _PARISC_SIGINFO_H
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
/* /*
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3) #define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
#define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO #define HAVE_ARCH_COPY_SIGINFO
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment