fix struct signalfd_siginfo
authorTimo Teräs <timo.teras@iki.fi>
Wed, 25 Dec 2013 11:33:46 +0000 (13:33 +0200)
committerRich Felker <dalias@aerifal.cx>
Mon, 30 Dec 2013 02:55:21 +0000 (21:55 -0500)
ssi_ptr is really 64-bit in kernel, so fix that. assuming sizeof(void*)
for it also caused incorrect padding for 32-bits, as the following
64-bits are aligned to 64-bits (and the padding was not taken into
account), so fix the padding as well. add addr_lsb field while there.

include/sys/signalfd.h

index 4f3d399..55431b9 100644 (file)
@@ -30,11 +30,12 @@ struct signalfd_siginfo {
        uint32_t  ssi_trapno;
        int32_t   ssi_status;
        int32_t   ssi_int;
-       uintptr_t ssi_ptr;
+       uint64_t  ssi_ptr;
        uint64_t  ssi_utime;
        uint64_t  ssi_stime;
        uint64_t  ssi_addr;
-       uint8_t   pad[128-12*4-sizeof(void *)-3*8];
+       uint16_t  ssi_addr_lsb;
+       uint8_t   pad[128-12*4-4*8-2];
 };
 
 #ifdef __cplusplus