pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
virtualbox: Set of patches pushing the NetBSD build forward
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Jul 8 22:07:56 2016 +0200
Changeset: b2b40e7601f2506b4d4e31ea5022a177f637dc78
Modified Files:
virtualbox/distinfo
virtualbox/patches/patch-src_VBox_Runtime_r3_posix_fs-posix.cpp
virtualbox/patches/patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp
Added Files:
virtualbox/patches/patch-include_iprt_time.h
virtualbox/patches/patch-out_netbsd.amd64_release_bin_sdk_bindings_xpcom_include_nsprpub_md___netbsd.cfg
virtualbox/patches/patch-src_VBox_Runtime_r3_posix_semevent-posix.cpp
Log Message:
virtualbox: Set of patches pushing the NetBSD build forward
I don't know why non of that:
defined(_LINUX_TIME_H)
is defined with current NetBSD port, which originated from FreeBSD.
Add a kludge to walk-around it for now.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b2b40e7601f2506b4d4e31ea5022a177f637dc78
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
virtualbox/distinfo | 7 ++--
virtualbox/patches/patch-include_iprt_time.h | 22 ++++++++++++
..._bindings_xpcom_include_nsprpub_md___netbsd.cfg | 13 +++++++
.../patch-src_VBox_Runtime_r3_posix_fs-posix.cpp | 41 +++++++++++++++++-----
...ch-src_VBox_Runtime_r3_posix_semevent-posix.cpp | 18 ++++++++++
...tch-src_VBox_Runtime_r3_posix_thread2-posix.cpp | 9 +++++
6 files changed, 99 insertions(+), 11 deletions(-)
diffs:
diff --git a/virtualbox/distinfo b/virtualbox/distinfo
index 8501da0..a54c869 100644
--- a/virtualbox/distinfo
+++ b/virtualbox/distinfo
@@ -12,7 +12,9 @@ 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-kBuild_header.kmk) = b08bde255f27e9e62d15c649b16a34d72b4d79f6
+SHA1 (patch-out_netbsd.amd64_release_bin_sdk_bindings_xpcom_include_nsprpub_md___netbsd.cfg) = c773c1bb3edb5c8f6ed830b77ba7f42597318b50
SHA1 (patch-src_VBox_Additions_Makefile.kmk) = e47ebb5cbfb51d103f76e1316b18e835fb5d6b1d
SHA1 (patch-src_VBox_Additions_common_VBoxGuestLib_VBoxGuestR3Lib.cpp) = 99138a3a7abd00e74c50f0fdc841ac7984e11a08
SHA1 (patch-src_VBox_Additions_common_VBoxGuestLib_VBoxGuestR3LibLog.cpp) = e0b83d8785a8bfe000c6467d125d3b45c1517ff7
@@ -184,10 +186,11 @@ SHA1 (patch-src_VBox_Runtime_r3_netbsd_rtProcInitExePath-netbsd.cpp) = 8395efc04
SHA1 (patch-src_VBox_Runtime_r3_netbsd_systemmem-netbsd.cpp) = 8839c15e35275013952da1573f66d79c40dc78a4
SHA1 (patch-src_VBox_Runtime_r3_posix_fileaio-posix.cpp) = 71651627904b5ff98a2b2771a09bcc99a2eb82ad
SHA1 (patch-src_VBox_Runtime_r3_posix_fileio-posix.cpp) = 7a1938001c15ce6bf6f46777cde671ece9ba1e32
-SHA1 (patch-src_VBox_Runtime_r3_posix_fs-posix.cpp) = 38911cba4785635527aed70d0fb819821b3e6342
+SHA1 (patch-src_VBox_Runtime_r3_posix_fs-posix.cpp) = d5563cc3821f29bc056c21f86d32eb4b1010eb11
SHA1 (patch-src_VBox_Runtime_r3_posix_path2-posix.cpp) = 512e64a1ae953748f589e95f95b3945935310514
+SHA1 (patch-src_VBox_Runtime_r3_posix_semevent-posix.cpp) = a14adc94fc580c1b46bd0c090f97d97b0aed1996
SHA1 (patch-src_VBox_Runtime_r3_posix_thread-posix.cpp) = c6e672e0a394cd013e71341689c680c4bff81d38
-SHA1 (patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp) = c909a7e96477284102624502e3bbf790ec2b71a6
+SHA1 (patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp) = cab9219ea9a423713c0a1e4381955bd9c78615d1
SHA1 (patch-src_VBox_Storage_testcase_Makefile.kmk) = edafb43c93359d0b37fbe4bec839370f2d2db29e
SHA1 (patch-src_VBox_VMM_VMMR0_GMMR0.cpp) = 08336e3aa159e2d2092cacbd16c2011963fe3908
SHA1 (patch-src_VBox_VMM_VMMR0_VMMR0.cpp) = 57f17e39057edea79be1fa16a43f0624eaf2a15b
diff --git a/virtualbox/patches/patch-include_iprt_time.h b/virtualbox/patches/patch-include_iprt_time.h
new file mode 100644
index 0000000..1345c3d
--- /dev/null
+++ b/virtualbox/patches/patch-include_iprt_time.h
@@ -0,0 +1,22 @@
+$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
+
+
+ /* 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
+ /**
+ * Gets the time as POSIX timeval.
+ *
+@@ -1031,4 +1035,3 @@ RTDECL(uint64_t) RTTimeProgramStartNanoT
+ RT_C_DECLS_END
+
+ #endif
+-
diff --git a/virtualbox/patches/patch-out_netbsd.amd64_release_bin_sdk_bindings_xpcom_include_nsprpub_md___netbsd.cfg b/virtualbox/patches/patch-out_netbsd.amd64_release_bin_sdk_bindings_xpcom_include_nsprpub_md___netbsd.cfg
new file mode 100644
index 0000000..f455383
--- /dev/null
+++ b/virtualbox/patches/patch-out_netbsd.amd64_release_bin_sdk_bindings_xpcom_include_nsprpub_md___netbsd.cfg
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- out/netbsd.amd64/release/bin/sdk/bindings/xpcom/include/nsprpub/md/_netbsd.cfg.orig 2016-03-04 19:30:36.000000000 +0000
++++ out/netbsd.amd64/release/bin/sdk/bindings/xpcom/include/nsprpub/md/_netbsd.cfg
+@@ -140,7 +140,7 @@
+ #define PR_ALIGN_OF_DOUBLE 8
+ #define PR_ALIGN_OF_POINTER 4
+
+-#elif defined(__alpha__)
++#elif defined(__alpha__) || defined(__x86_64__)
+ #define IS_LITTLE_ENDIAN 1
+ #undef IS_BIG_ENDIAN
+ #define HAVE_LONG_LONG
diff --git a/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_fs-posix.cpp b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_fs-posix.cpp
index 96b1928..c2eb90e 100644
--- a/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_fs-posix.cpp
+++ b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_fs-posix.cpp
@@ -11,12 +11,35 @@ $NetBSD$
# include <sys/mount.h>
#endif
-@@ -287,7 +287,7 @@ RTR3DECL(int) RTFsQueryType(const char *
- else if (!strcmp("nfs", Stat.st_fstype))
- *penmType = RTFSTYPE_NFS;
-
--#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
-+#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
- struct statfs statfsBuf;
- if (!statfs(pszNativeFsPath, &statfsBuf))
- {
+@@ -311,6 +311,31 @@ RTR3DECL(int) RTFsQueryType(const char *
+ }
+ else
+ rc = RTErrConvertFromErrno(errno);
++
++#elif defined(RT_OS_NETBSD)
++ struct statvfs statfsBuf;
++ if (!statvfs(pszNativeFsPath, &statfsBuf))
++ {
++ if (!strcmp("hfs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_HFS;
++ else if ( !strcmp("fat", statfsBuf.f_fstypename)
++ || !strcmp("msdos", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_FAT;
++ else if (!strcmp("ntfs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_NTFS;
++ else if (!strcmp("autofs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_AUTOFS;
++ else if (!strcmp("devfs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_DEVFS;
++ else if (!strcmp("nfs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_NFS;
++ else if (!strcmp("ufs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_UFS;
++ else if (!strcmp("zfs", statfsBuf.f_fstypename))
++ *penmType = RTFSTYPE_ZFS;
++ }
++ else
++ rc = RTErrConvertFromErrno(errno);
+ #endif
+ }
+ else
diff --git a/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_semevent-posix.cpp b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_semevent-posix.cpp
new file mode 100644
index 0000000..94c691b
--- /dev/null
+++ b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_semevent-posix.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- src/VBox/Runtime/r3/posix/semevent-posix.cpp.orig 2016-03-04 19:30:03.000000000 +0000
++++ src/VBox/Runtime/r3/posix/semevent-posix.cpp
+@@ -49,7 +49,7 @@
+ # define pthread_yield() pthread_yield_np()
+ #endif
+
+-#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
++#if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
+ # include <sched.h>
+ # define pthread_yield() sched_yield()
+ #endif
+@@ -544,4 +544,3 @@ RTDECL(void) RTSemEventRemoveSignaller(R
+ RTLockValidatorRecSharedRemoveOwner(&pThis->Signallers, hThread);
+ #endif
+ }
+-
diff --git a/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp
index 375afaa..ff77e9f 100644
--- a/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp
+++ b/virtualbox/patches/patch-src_VBox_Runtime_r3_posix_thread2-posix.cpp
@@ -20,6 +20,15 @@ $NetBSD$
sched_yield();
#else
if (!pthread_yield())
+@@ -130,7 +130,7 @@ RTDECL(bool) RTThreadYield(void)
+ #endif
+ #ifdef RT_OS_DARWIN
+ pthread_yield_np();
+-#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU)
++#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_NETBSD)
+ sched_yield();
+ #else
+ pthread_yield();
@@ -144,4 +144,3 @@ RTDECL(bool) RTThreadYield(void)
#endif
return fRc;
Home |
Main Index |
Thread Index |
Old Index