virtualbox: Fix further building on NetBSD
authorKamil Rytarowski <n54@gmx.com>
Sat, 9 Jul 2016 15:21:21 +0000 (17:21 +0200)
committerKamil Rytarowski <n54@gmx.com>
Sat, 9 Jul 2016 15:21:21 +0000 (17:21 +0200)
This code:
if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H)
is a kludge to detect whether an OS header defining struct timeval was included.

On NetBSD it's defined(_SYS_TIME_H_)

virtualbox/distinfo
virtualbox/patches/patch-include_iprt_time.h

index 534d753179e1c71ec7562ee5b5a3aefb237cbc7d..1985425dff8756d97917ae08678b8c5e7674d259 100644 (file)
@@ -12,7 +12,7 @@ SHA1 (patch-include_VBox_ostypes.h) = fd452f95c79b2e5c98a048af21f6561c80adebc5
 SHA1 (patch-include_VBox_param.h) = 1efcacb3e7890344dc132fee85b945bf9baa9614
 SHA1 (patch-include_VBox_usb.h) = c16d333f6dee240f1d4147cc49c04451dfb776a7
 SHA1 (patch-include_iprt_string.h) = dd74a70d35be03f480bbb42db170cf7c5f583e4e
-SHA1 (patch-include_iprt_time.h) = 82e31a8c80606ae6f152e2de9f90f02aad4991b7
+SHA1 (patch-include_iprt_time.h) = 9940a7b65300990d2fbeb7629813323e8b7971c5
 SHA1 (patch-kBuild_header.kmk) = b08bde255f27e9e62d15c649b16a34d72b4d79f6
 SHA1 (patch-src_VBox_Additions_Makefile.kmk) = e47ebb5cbfb51d103f76e1316b18e835fb5d6b1d
 SHA1 (patch-src_VBox_Additions_common_VBoxGuestLib_VBoxGuestR3Lib.cpp) = 99138a3a7abd00e74c50f0fdc841ac7984e11a08
index 1345c3d639fe3c5839d8b402c82bdec4e5094a39..639c55221e0014932815b23f7bbcf466a351c6b6 100644 (file)
@@ -2,20 +2,16 @@ $NetBSD$
 
 --- include/iprt/time.h.orig   2016-03-04 19:23:02.000000000 +0000
 +++ include/iprt/time.h
-@@ -353,7 +353,11 @@ DECLINLINE(void) RTTimeSpecGetSecondsAnd
+@@ -353,7 +353,7 @@ DECLINLINE(void) RTTimeSpecGetSecondsAnd
  
  
  /* PORTME: Add struct timeval guard macro here. */
 -#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H)
-+// HACK TO GET RTTimeSpecGetTimeval defined on NetBSD
-+#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) || defined(__NetBSD__)
-+#if defined(__NetBSD__)
-+#include <sys/time.h>
-+#endif
++#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) || defined(_SYS_TIME_H_)
  /**
   * Gets the time as POSIX timeval.
   *
-@@ -1031,4 +1035,3 @@ RTDECL(uint64_t) RTTimeProgramStartNanoT
+@@ -1031,4 +1031,3 @@ RTDECL(uint64_t) RTTimeProgramStartNanoT
  RT_C_DECLS_END
  
  #endif