Commits

Edd Barrett  committed 9e9c24b

OpenBSD will no longer have <sys/timeb.h> soon.

This diff fixes the build for an OpenBSD system with the header missing.

In the long term we should look for a way to make timeb.h optional
regardless of platform. Most platforms will have gettimeofday(2), so timeb.h
would not be required anyway.

  • Participants
  • Parent commits d545cec
  • Branches timeb_h

Comments (0)

Files changed (1)

File rpython/rtyper/module/ll_time.py

     FTIME = 'ftime'
     STRUCT_TIMEB = 'struct timeb'
     includes = [TIME_H, 'time.h', 'errno.h', 'sys/select.h',
-                'sys/types.h', 'unistd.h', 'sys/timeb.h',
+                'sys/types.h', 'unistd.h',
                 'sys/time.h', 'sys/resource.h']
+
+    if not sys.platform.startswith("openbsd"):
+        includes.append('sys/timeb.h')
+
     need_rusage = True