From 7f5471529c2f85ce528292ea5d4a146597d47588 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 16 Jun 2011 17:11:35 -0400 Subject: [PATCH] fix some struct padding to match LSB/glibc ABI where it may be helpful --- include/signal.h | 1 + include/sys/socket.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/signal.h b/include/signal.h index 1b589089..6625981f 100644 --- a/include/signal.h +++ b/include/signal.h @@ -54,6 +54,7 @@ struct sigevent { int sigev_notify; void (*sigev_notify_function)(union sigval); pthread_attr_t *sigev_notify_attributes; + char __pad[56-3*sizeof(long)]; }; #define SIGEV_SIGNAL 0 diff --git a/include/sys/socket.h b/include/sys/socket.h index 4005eb6d..71d9b884 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -26,8 +26,10 @@ struct sockaddr struct sockaddr_storage { sa_family_t ss_family; - long long __ss_align; - char __ss_padding[128 - sizeof(sa_family_t) - sizeof(long long)]; + union { + long long __align; + char __padding[126]; + } __padding; }; int socket (int, int, int); -- 2.25.1