Commits

David Schneider committed 9daab4f

fix translation on Macs

Comments (0)

Files changed (1)

pypy/rpython/module/ll_os.py

     _WIN32 = True
 else:
     _WIN32 = False
-
 if _WIN32:
     underscore_on_windows = '_'
 else:
     underscore_on_windows = ''
 
+_DARWIN = sys.platform.startswith('darwin')
+
 includes = []
 if not _WIN32:
     # XXX many of these includes are not portable at all
     includes += ['dirent.h', 'sys/stat.h',
                  'sys/times.h', 'utime.h', 'sys/types.h', 'unistd.h',
-                 'signal.h', 'sys/wait.h', 'fcntl.h', 'pty.h']
+                 'signal.h', 'sys/wait.h', 'fcntl.h']
+    if _DARWIN:
+        includes += ['util.h']
+    else:
+        includes += ['pty.h']
+
 else:
     includes += ['sys/utime.h']