Browse Source

fix struct signalfd_siginfo

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.
Timo Teräs 11 years ago
parent
commit
7e10f209fb
1 changed files with 3 additions and 2 deletions
  1. 3 2
      include/sys/signalfd.h

+ 3 - 2
include/sys/signalfd.h

@@ -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