]> granicus.if.org Git - check/commitdiff
libcompat.h: include sys/time.h only if it is available
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:10 +0000 (03:04 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:10 +0000 (03:04 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@935 64e312b2-a51f-0410-8e61-82d0ca0eb02a

lib/libcompat.h

index 55034dc6ef02abf1a49f7bcc32817a523006be05..253755505de18f76122d12aae68b0385c11271cd 100644 (file)
@@ -44,7 +44,9 @@
 #include <stdlib.h>
 
 /* provides localtime and struct tm */
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif /* !HAVE_SYS_TIME_H */
 #include <time.h>
 
 /* declares fork(), _POSIX_VERSION.  according to Autoconf.info,