diff --git a/setup.py b/setup.py index 3341e46e9e3..7e9d7fe6c5a 100644 --- a/setup.py +++ b/setup.py @@ -732,9 +732,11 @@ class found(Exception): pass )) # Dynamic loading module - dl_inc = find_file('dlfcn.h', [], inc_dirs) - if (dl_inc is not None) and (platform not in ['atheos']): - exts.append( Extension('dl', ['dlmodule.c']) ) + if sys.maxint == 0x7fffffff: + # This requires sizeof(int) == sizeof(long) == sizeof(char*) + dl_inc = find_file('dlfcn.h', [], inc_dirs) + if (dl_inc is not None) and (platform not in ['atheos']): + exts.append( Extension('dl', ['dlmodule.c']) ) # Platform-specific libraries if platform == 'linux2':