summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2009-01-09 16:47:07 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2009-01-09 16:47:07 (GMT)
commitd89f5b20b2e00241eebd8ca592520c429d6f0d4c (patch)
tree80a83cfb9b09ee68a91db223c4fbc2e170aa1291 /Include
parent343b970da9404be5cf6ef3544a11d9da014b4f42 (diff)
downloadcpython-d89f5b20b2e00241eebd8ca592520c429d6f0d4c.zip
cpython-d89f5b20b2e00241eebd8ca592520c429d6f0d4c.tar.gz
cpython-d89f5b20b2e00241eebd8ca592520c429d6f0d4c.tar.bz2
Fix issue 4884, preventing a crash in the socket code when python is compiled
with llvm-gcc and run with a glibc <2.10.
Diffstat (limited to 'Include')
-rw-r--r--Include/pyport.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 15c8644..54411f2 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -709,6 +709,15 @@ typedef struct fd_set {
#define Py_FORMAT_PARSETUPLE(func,p1,p2)
#endif
+/*
+ * Specify alignment on compilers that support it.
+ */
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define Py_ALIGNED(x) __attribute__((aligned(x)))
+#else
+#define Py_ALIGNED(x)
+#endif
+
/* Eliminate end-of-loop code not reached warnings from SunPro C
* when using do{...}while(0) macros
*/