Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit b6820ac

Browse files
committed
Disable strict-aliasing
1 parent c402d29 commit b6820ac

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010
if sys.platform == 'win32':
1111
libs.append('ws2_32')
1212

13+
compile_args = []
14+
# http://bugs.python.org/issue969718
15+
if sys.version_info[0] == 2:
16+
compile_args.append('-fno-strict-aliasing')
17+
1318
module1 = Extension('GeoIP',
1419
libraries=libs,
15-
sources=['py_GeoIP.c'])
20+
sources=['py_GeoIP.c'],
21+
extra_compile_args=compile_args)
1622

1723
setup(
1824
name='GeoIP',

0 commit comments

Comments
 (0)