summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-05 13:04:03 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-05 13:04:03 (GMT)
commita4c727131efc4b1a7f08d837d20bd9f592197e52 (patch)
tree9e3d254871c4b9620be36e12d880651adf4533e7 /Modules
parentd7c7e0ef69e0aacc24d34388dd68927f7f7ee1f3 (diff)
downloadcpython-a4c727131efc4b1a7f08d837d20bd9f592197e52.zip
cpython-a4c727131efc4b1a7f08d837d20bd9f592197e52.tar.gz
cpython-a4c727131efc4b1a7f08d837d20bd9f592197e52.tar.bz2
Fix "GCC diagnostic" in socketmodule.c
Fix regression of changeset 7c6e3358221a on GCC < 4.4. The _socket module cannot be compiled on "x86 FreeBSD 7.2 3.x" buildbot anymore.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 4eb3978..483dae5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1966,13 +1966,13 @@ cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
- #ifdef __GNUC__
+ #if defined(__GNUC__) && ((__GNUC__ == 4) || ((__GNUC__ > 4) && (__GNUC_MINOR__ > 5)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
if (msg->msg_controllen < 0)
return 0;
- #ifdef __GNUC__
+ #if defined(__GNUC__) && ((__GNUC__ == 4) || ((__GNUC__ > 4) && (__GNUC_MINOR__ > 5)))
#pragma GCC diagnostic pop
#endif
#ifdef __clang__