[pypy-commit] pypy timeb_h: OpenBSD will no longer have <sys/timeb.h> soon.
vext01
noreply at buildbot.pypy.org
Thu Dec 5 01:15:53 CET 2013
Author: Edd Barrett <vext01 at gmail.com>
Branch: timeb_h
Changeset: r68375:9e9c24bc41fa
Date: 2013-12-04 13:54 +0000
http://bitbucket.org/pypy/pypy/changeset/9e9c24bc41fa/
Log: 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.
diff --git a/rpython/rtyper/module/ll_time.py b/rpython/rtyper/module/ll_time.py
--- a/rpython/rtyper/module/ll_time.py
+++ b/rpython/rtyper/module/ll_time.py
@@ -24,8 +24,12 @@
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
More information about the pypy-commit
mailing list