Building under Python 2 passes -fno-strict-aliasing to gcc. By default
under Python 3 it doesn't, so add it in setup.py.
Signed-off-by: Andy Grover <agrover(a)redhat.com>
---
setup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index a77378c..0c7321a 100644
--- a/setup.py
+++ b/setup.py
@@ -67,6 +67,7 @@ setup(name='ethtool',
'python-ethtool/etherinfo_obj.c',
'python-ethtool/netlink.c',
'python-ethtool/netlink-address.c'],
+ extra_compile_args=['-fno-strict-aliasing'],
include_dirs = libnl['include'],
library_dirs = libnl['libdirs'],
libraries = libnl['libs'],
--
1.9.3