[pypy-commit] pypy default: fix mingw build

sthalik noreply at buildbot.pypy.org
Tue Mar 26 05:23:21 CET 2013


Author: Stanislaw Halik <sthalik at misaki.pl>
Branch: 
Changeset: r62789:959fd3e261fb
Date: 2013-03-26 05:14 +0100
http://bitbucket.org/pypy/pypy/changeset/959fd3e261fb/

Log:	fix mingw build

	tcp_keepalive exists on MinGW64, leading to redefinition.

	MinGW32 doesn't compile anyway due to broken headers, and support
	for it ought to be dropped anyway.

diff --git a/rpython/rlib/_rsocket_rffi.py b/rpython/rlib/_rsocket_rffi.py
--- a/rpython/rlib/_rsocket_rffi.py
+++ b/rpython/rlib/_rsocket_rffi.py
@@ -81,11 +81,14 @@
             '#define RCVALL_ON              1',
             '#define RCVALL_SOCKETLEVELONLY 2',
             '''\
+            #ifndef __MINGW32__
             struct tcp_keepalive {
                 u_long  onoff;
                 u_long  keepalivetime;
                 u_long  keepaliveinterval;
-            };'''
+            };
+            #endif
+            '''
             ])
     HEADER = '\n'.join(header_lines)
     COND_HEADER = ''


More information about the pypy-commit mailing list