diff -r b26975483841 -r 2243ba216f66 setup.py --- a/setup.py Fri Mar 24 16:20:10 2017 -0700 +++ b/setup.py Fri Mar 24 14:59:19 2017 -0700 @@ -591,24 +591,21 @@ osutil_ldflags = [] # platform specific macros -for plat, func in [('bsd', 'setproctitle'), ('bsd|darwin|linux', 'statfs')]: +for plat, func in [('bsd', 'setproctitle')]: if re.search(plat, sys.platform) and hasfunction(new_compiler(), func): osutil_cflags.append('-DHAVE_%s' % func.upper()) -for plat, header in [ - ('linux', 'linux/magic.h'), - ('linux', 'sys/vfs.h'), -]: - if re.search(plat, sys.platform) and hasheader(new_compiler(), header): - macro = header.replace('/', '_').replace('.', '_').upper() - osutil_cflags.append('-DHAVE_%s' % macro) - for plat, macro, code in [ ('bsd|darwin', 'BSD_STATFS', ''' #include #include int main() { struct statfs s; return sizeof(s.f_fstypename); } '''), + ('linux', 'LINUX_STATFS', ''' + #include + #include + int main() { struct statfs s; return sizeof(s.f_type); } + '''), ]: if re.search(plat, sys.platform) and cancompile(new_compiler(), code): osutil_cflags.append('-DHAVE_%s' % macro)