diff options
Diffstat (limited to 'Modules/socketmodule.c')
| -rw-r--r-- | Modules/socketmodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 7d91af22da..b7b9a649af 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3159,7 +3159,11 @@ socket_gethostbyaddr(PyObject *self, PyObject *args) #ifdef HAVE_GETHOSTBYNAME_R_3_ARG struct hostent_data data; #else - char buf[16384]; + /* glibcs up to 2.10 assume that the buf argument to + gethostbyaddr_r is 8-byte aligned, which at least llvm-gcc + does not ensure. The attribute below instructs the compiler + to maintain this alignment. */ + char buf[16384] Py_ALIGNED(8); int buf_len = (sizeof buf) - 1; int errnop; #endif |
