diff options
author | agc <agc> | 2007-10-17 21:35:53 +0000 |
---|---|---|
committer | agc <agc> | 2007-10-17 21:35:53 +0000 |
commit | 4ba505692e79d52ae40f031a79f22168228e56ba (patch) | |
tree | 72ef9df3983fcc9b58ee9334664a9bd8cea91281 /sysutils | |
parent | b4485031ce6f23ed3d6cbce3f546fb86b7d67272 (diff) | |
download | pkgsrc-4ba505692e79d52ae40f031a79f22168228e56ba.tar.gz |
Initial import of open-vm-tools (version 2007.09.04-56574) into the
Packages Collection.
The Open Virtual Machine Tools (open-vm-tools) are the open source
implementation of VMware Tools. They are a set of guest operating
system virtualization components that enhance performance and user
experience of virtual machines. As virtualization technology rapidly
becomes mainstream, each virtualization solution provider implements
their own set of tools and utilities to supplement the guest virtual
machine. However, most of the implementations are proprietary and are
tied to a specific virtualization platform.
The tools are currently composed of kernel modules for Linux and
user-space programs for all VMware supported Unix-like guest operating
systems. They provide several useful functions like:
* File transfer between a host and guest
* Improved memory management and network performance under
virtualization
* General mechanisms and protocols for communication between host
and guests and from guest to guest
Diffstat (limited to 'sysutils')
33 files changed, 1042 insertions, 0 deletions
diff --git a/sysutils/open-vm-tools/DESCR b/sysutils/open-vm-tools/DESCR new file mode 100644 index 00000000000..bc81c905f6b --- /dev/null +++ b/sysutils/open-vm-tools/DESCR @@ -0,0 +1,18 @@ +The Open Virtual Machine Tools (open-vm-tools) are the open source +implementation of VMware Tools. They are a set of guest operating +system virtualization components that enhance performance and user +experience of virtual machines. As virtualization technology rapidly +becomes mainstream, each virtualization solution provider implements +their own set of tools and utilities to supplement the guest virtual +machine. However, most of the implementations are proprietary and are +tied to a specific virtualization platform. + +The tools are currently composed of kernel modules for Linux and +user-space programs for all VMware supported Unix-like guest operating +systems. They provide several useful functions like: + + * File transfer between a host and guest + * Improved memory management and network performance under + virtualization + * General mechanisms and protocols for communication between host + and guests and from guest to guest diff --git a/sysutils/open-vm-tools/Makefile b/sysutils/open-vm-tools/Makefile new file mode 100644 index 00000000000..52069448f72 --- /dev/null +++ b/sysutils/open-vm-tools/Makefile @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +DISTNAME= open-vm-tools-2007.09.04-56574 +PKGNAME= open-vm-tools-2007.09.04.56574 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=open-vm-tools/} + +MAINTAINER= agc@NetBSD.org +HOMEPAGE= http://open-vm-tools.sourceforge.net/ +COMMENT= Open source VMware tools + +GNU_CONFIGURE= yes +USE_LANGUAGES+= c c++ +USE_LIBTOOL= yes +USE_TOOLS+= pkg-config + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/guestd/guestd ${PREFIX}/sbin/vmware-guestd + +.include "../../security/openssl/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../x11/libXinerama/buildlink3.mk" +.include "../../x11/libXrandr/buildlink3.mk" +.include "../../x11/libXrender/buildlink3.mk" +.include "../../x11/libXtst/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/open-vm-tools/PLIST b/sysutils/open-vm-tools/PLIST new file mode 100644 index 00000000000..e9a91ed449b --- /dev/null +++ b/sysutils/open-vm-tools/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ +lib/libguestlib.la +sbin/vmware-guestd diff --git a/sysutils/open-vm-tools/distinfo b/sysutils/open-vm-tools/distinfo new file mode 100644 index 00000000000..194c11062b4 --- /dev/null +++ b/sysutils/open-vm-tools/distinfo @@ -0,0 +1,34 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +SHA1 (open-vm-tools-2007.09.04-56574.tar.gz) = d3ffcd974e67b5f83b760582f8c2606721d94403 +RMD160 (open-vm-tools-2007.09.04-56574.tar.gz) = 8bb9952471ff5635e70741afd357170b6c0a8307 +Size (open-vm-tools-2007.09.04-56574.tar.gz) = 1987725 bytes +SHA1 (patch-aa) = 18b8fdb983268f3f8d584cb87df22f704bd871ea +SHA1 (patch-ab) = 06e20655385abe4882ee5b1f0743194c9d4ad89e +SHA1 (patch-ac) = 9b41a45492069a955487ebec74aeab8fe81f2389 +SHA1 (patch-ad) = 88343d37ef042d3b7755d3c61246aa499fd33d75 +SHA1 (patch-ae) = 5935f63467af70ef0f139ff0a640a67976cca3b1 +SHA1 (patch-af) = b8255d69d143f2a0274162ac8d9c869e5c3ecfb9 +SHA1 (patch-ag) = 4f589d6ca71c7222f841cc02d01398d2ca7f796c +SHA1 (patch-ah) = 311d8e44fc98f61653c39e7595b3c588441b6414 +SHA1 (patch-ai) = 0441e29f7b286142f0a98ede57e2a0b9bee6a4fd +SHA1 (patch-aj) = 441a6774359864afa85e73b4375198d67c5f81f3 +SHA1 (patch-ak) = df29cec4aa4bbe0aef485a544865dc9c033d99fd +SHA1 (patch-al) = 89d9f42aa123f5bb3f6c9b2b5cdf080a06b06d3b +SHA1 (patch-am) = f62d4a9b0acb6e527a4912ee86ed47ee948d06ea +SHA1 (patch-an) = 60b92ad15dfcf251dbe9e6859693efdef3b668c2 +SHA1 (patch-ao) = 0447c1de5251c8e946025604d7ce0b577bda3962 +SHA1 (patch-ap) = 4a76ce695183be059442cc731f2b04bf122ac59c +SHA1 (patch-aq) = a95a41e051f9b3fe5ef0b32df3660b914da37f6d +SHA1 (patch-ar) = 45a84a45e137d02fa16e100f8dd82d8d4f249e02 +SHA1 (patch-as) = 23818461de9c6a9803e674a0ccf8544c8ac2cfb7 +SHA1 (patch-at) = 03dcfb95ec6159e3445405a3a2fb467898d94b3b +SHA1 (patch-au) = 776c001223ecd043fa4a8fc61d5c8bd1c5b4ef4d +SHA1 (patch-av) = 02f5d5d9e91d6aacf79168bc751396b217789125 +SHA1 (patch-aw) = 8f84b0cf9728ccd3bbb1c547d61956d8c9664a88 +SHA1 (patch-ax) = 7d7eebdf405ea4b5aac10986133f66f9f89d3893 +SHA1 (patch-ay) = 5bdfd3b2ba1681a6e11b43e0f19965e3eef7ed01 +SHA1 (patch-az) = 430c96756a27712d0731a9561266ba45da56937e +SHA1 (patch-ba) = 01c5aa4b52a80c1a5159c49fcf40d4081f3a1ede +SHA1 (patch-bb) = cb40fa71de36265afc872be009fdd0c189404c23 +SHA1 (patch-bc) = f4876b2eeb10362b7d0fa2062cf899d398db28ab diff --git a/sysutils/open-vm-tools/patches/patch-aa b/sysutils/open-vm-tools/patches/patch-aa new file mode 100644 index 00000000000..58a5d3aaf2a --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-aa @@ -0,0 +1,14 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- configure 2007/09/28 13:16:03 1.1 ++++ configure 2007/09/28 13:17:22 +@@ -2171,6 +2171,9 @@ + freebsd*) + os="freebsd" + ;; ++ netbsd*) ++ os="netbsd" ++ ;; + solaris*) + os="solaris" + case "$host_os" in diff --git a/sysutils/open-vm-tools/patches/patch-ab b/sysutils/open-vm-tools/patches/patch-ab new file mode 100644 index 00000000000..87f4d83dd16 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/vm_product.h 2007/09/28 18:47:13 1.1 ++++ lib/include/vm_product.h 2007/09/28 18:47:55 +@@ -416,6 +416,8 @@ + # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for Windows" + #elif defined(__FreeBSD__) + # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for FreeBSD" ++#elif defined(__NetBSD__) ++# define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for NetBSD" + #elif defined(sun) + # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for Solaris" + #else diff --git a/sysutils/open-vm-tools/patches/patch-ac b/sysutils/open-vm-tools/patches/patch-ac new file mode 100644 index 00000000000..b68a79e6d58 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ac @@ -0,0 +1,23 @@ +$NetBSD: patch-ac,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/vm_basic_types.h 2007/09/28 18:49:45 1.1 ++++ lib/include/vm_basic_types.h 2007/09/28 18:51:32 +@@ -140,7 +140,7 @@ + * This applies to Solaris as well. + */ + +-#if defined(__FreeBSD__) || defined(sun) ++#if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + # ifdef KLD_MODULE + # include <sys/types.h> + # else +@@ -631,7 +631,8 @@ + * On FreeBSD (for the tools build), size_t is typedef'd if _BSD_SIZE_T_ + * is defined. Use the same logic here so we don't define it twice. [greg] + */ +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++# include <sys/types.h> + # ifdef _BSD_SIZE_T_ + # undef _BSD_SIZE_T_ + # ifdef VM_I386 diff --git a/sysutils/open-vm-tools/patches/patch-ad b/sysutils/open-vm-tools/patches/patch-ad new file mode 100644 index 00000000000..44c15e11f21 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/su.h 2007/09/28 19:00:23 1.1 ++++ lib/include/su.h 2007/09/28 19:00:48 +@@ -49,7 +49,7 @@ + Bool Id_AuthSet(void const *buf, size_t size); + Bool Id_AuthCheck(char const *right); + +-#elif (defined(__linux__) || defined(sun) || defined(__FreeBSD__)) && !defined(N_PLAT_NLM) ++#elif (defined(__linux__) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(N_PLAT_NLM) + + #include <sys/types.h> + #include <unistd.h> diff --git a/sysutils/open-vm-tools/patches/patch-ae b/sysutils/open-vm-tools/patches/patch-ae new file mode 100644 index 00000000000..f997b90aef0 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ae @@ -0,0 +1,22 @@ +$NetBSD: patch-ae,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/user/utilPosix.c 2007/09/28 19:02:18 1.1 ++++ lib/user/utilPosix.c 2007/09/28 19:03:46 +@@ -80,7 +80,7 @@ + + + +-#if !__FreeBSD__ && !sun ++#if !__FreeBSD__ && !sun && !__NetBSD__ + + /* + *----------------------------------------------------------------------------- +@@ -542,7 +542,7 @@ + #endif // __linux__ + + +-#if defined(__linux__) || defined(__FreeBSD__) || defined(sun) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + /* + *---------------------------------------------------------------------------- + * diff --git a/sysutils/open-vm-tools/patches/patch-af b/sysutils/open-vm-tools/patches/patch-af new file mode 100644 index 00000000000..3146526904f --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/user/util.c 2007/09/28 19:02:18 1.1 ++++ lib/user/util.c 2007/09/28 19:04:12 +@@ -575,7 +575,7 @@ + tid = getpid(); + ASSERT(tid != (pid_t)-1); + return tid; +-#elif __FreeBSD__ || sun ++#elif __FreeBSD__ || sun || __NetBSD__ + pid_t tid; + + tid = getpid(); diff --git a/sysutils/open-vm-tools/patches/patch-ag b/sysutils/open-vm-tools/patches/patch-ag new file mode 100644 index 00000000000..59500494afd --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ag @@ -0,0 +1,58 @@ +$NetBSD: patch-ag,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/file/filePosix.c 2007/09/28 19:06:00 1.1 ++++ lib/file/filePosix.c 2007/09/28 19:07:57 +@@ -24,7 +24,7 @@ + + #include <sys/types.h> /* Needed before sys/vfs.h with glibc 2.0 --hpreg */ + +-#if !__FreeBSD__ ++#if !__FreeBSD__ && !__NetBSD__ + # if !__APPLE__ + # include <sys/vfs.h> + # endif +@@ -64,7 +64,7 @@ + #include "dynbuf.h" + #include "localconfig.h" + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + static char *FilePosixLookupFSDeviceName(const char *filename); + + # ifdef VMX86_SERVER +@@ -382,7 +382,7 @@ + *---------------------------------------------------------------------- + */ + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + Bool + File_IsRemote(const char *fileName) // IN: File name + { +@@ -412,7 +412,7 @@ + #endif + #endif + } +-#endif /* !FreeBSD && !sun */ ++#endif /* !FreeBSD && !sun && !__NetBSD__ */ + + + /* +@@ -698,7 +698,7 @@ + } + + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + /* + *---------------------------------------------------------------------- + * +@@ -1368,7 +1368,7 @@ + } + + +-#endif /* !FreeBSD && !sun */ ++#endif /* !FreeBSD && !sun && !defined(__NetBSD__) */ + + + /* diff --git a/sysutils/open-vm-tools/patches/patch-ah b/sysutils/open-vm-tools/patches/patch-ah new file mode 100644 index 00000000000..b61cc5e8875 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ah @@ -0,0 +1,22 @@ +$NetBSD: patch-ah,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/file/fileIOPosix.c 2007/09/28 19:09:01 1.1 ++++ lib/file/fileIOPosix.c 2007/09/28 19:10:57 +@@ -659,7 +659,7 @@ + ASSERT(file->lockToken == NULL); + ASSERT(FILEIO_ERROR_LAST < 16); /* See comment in fileIO.h */ + +-#if !defined(__FreeBSD__) && !defined(sun) && !defined(N_PLAT_NLM) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(N_PLAT_NLM) && !defined(__NetBSD__) + /* + * If FILEIO_OPEN_EXCLUSIVE_LOCK or FILEIO_OPEN_MULTIWRITER_LOCK or + * (FILEIO_OPEN_ACCESS_READ | FILEIO_OPEN_LOCKED) are passed, and we are +@@ -1101,7 +1101,7 @@ + /* + * readv & writev are not available in the FreeBSD or Solaris Tools builds + */ +-#if !defined(VMX86_TOOLS) || (!defined(__FreeBSD__) && !defined(sun)) ++#if !defined(VMX86_TOOLS) || (!defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)) + + + /* diff --git a/sysutils/open-vm-tools/patches/patch-ai b/sysutils/open-vm-tools/patches/patch-ai new file mode 100644 index 00000000000..1082ab7fdec --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ai @@ -0,0 +1,22 @@ +$NetBSD: patch-ai,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/file/fileLockPosix.c 2007/09/28 19:14:30 1.1 ++++ lib/file/fileLockPosix.c 2007/09/28 19:15:17 +@@ -26,7 +26,7 @@ + #include <stdlib.h> + #include <string.h> + #include <sys/types.h> /* Needed before sys/vfs.h with glibc 2.0 --hpreg */ +-#if !defined(__FreeBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) + #if defined(__APPLE__) + #include <sys/param.h> + #include <sys/mount.h> +@@ -117,7 +117,7 @@ + fileLockOptions.userWorld = userWorld; + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + /* + *---------------------------------------------------------------------- + * diff --git a/sysutils/open-vm-tools/patches/patch-aj b/sysutils/open-vm-tools/patches/patch-aj new file mode 100644 index 00000000000..db41dfb50c5 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-aj @@ -0,0 +1,111 @@ +$NetBSD: patch-aj,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/guestInfo/guestInfoPosix.c 2007/09/28 19:18:35 1.1 ++++ lib/guestInfo/guestInfoPosix.c 2007/09/28 19:23:49 +@@ -43,10 +43,11 @@ + #include <sys/socket.h> + #include <sys/stat.h> + #include <errno.h> +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__NetBSD__) + # include <netinet/in.h> + # include <net/if_dl.h> + # include <ifaddrs.h> ++# include <sys/param.h> + # include <sys/sysctl.h> + #endif + #include "arpa/inet.h" +@@ -134,7 +135,7 @@ + }; + + +-#if !defined(__FreeBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) + static int FindMacAddress(PNicInfo nicInfo, char *macAddress); + #endif + static int GetSystemBitness(void); +@@ -191,7 +192,7 @@ + *----------------------------------------------------------------------------- + */ + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) && !defined(__NetBSD__) + Bool + GuestInfoGetNicInfo(PNicInfo nicInfo) // IN: + { +@@ -283,7 +284,7 @@ + return TRUE; + } + +-#else /* FreeBSD */ ++#else /* FreeBSD && !defined(__NetBSD__) */ + + Bool + GuestInfoGetNicInfo(PNicInfo nicInfo) // IN: +@@ -339,7 +340,10 @@ + * Get the mac address for this interface. Some interfaces (like the + * loopback interface) have no MAC address, and we skip them. + */ +-# ifndef sun ++#ifdef __NetBSD__ ++ Debug("GuestInfo: Failed to get MAC address, skipping interface\n"); ++ continue; ++#elif !defined(sun) + if (ioctl(sockfd, SIOCGIFHWADDR, ifr) < 0) { + Debug("GuestInfo: Failed to get MAC address, skipping interface\n"); + continue; +@@ -366,6 +370,7 @@ + *ptr, *(ptr + 1), *(ptr + 2), + *(ptr + 3), *(ptr + 4), *(ptr + 5)); + ++#ifndef __NetBSD__ + /* Which entry in nic info corresponds to this MAC address? */ + macIndex = FindMacAddress(nicInfo, macAddress); + if (macIndex < 0) { +@@ -381,6 +386,7 @@ + macAddress, sizeof macAddress); + nicInfo->numNicEntries++; + } ++#endif + + /* Get the corresponding IP address. */ + ifr->ifr_addr.sa_family = AF_INET; +@@ -828,6 +834,20 @@ + if (releaseLen != 0) { + Str_Strncat(osName, outBufLen, buf.release, releaseLen); + } ++ } else if (strstr(osNameFull, "NetBSD")) { ++ size_t nameLen = sizeof STR_OS_NETBSD - 1; ++ size_t releaseLen = 0; ++ ++ /* NetBSD, as usual, just DTRT */ ++ releaseLen = strlen(buf.release); ++ ++ if (nameLen + releaseLen + 1 > outBufLen) { ++ Debug("GuestInfoGetOSName: Error: buffer too small\n"); ++ return FALSE; ++ } ++ ++ Str_Strcpy(osName, STR_OS_NETBSD, outBufLen); ++ Str_Strncat(osName, outBufLen, buf.release, releaseLen); + } else if (strstr(osNameFull, "SunOS")) { + size_t nameLen = sizeof STR_OS_SOLARIS - 1; + size_t releaseLen = 0; +@@ -872,7 +892,7 @@ + } + + +-#if !defined(__FreeBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) + /* + *----------------------------------------------------------------------------- + * +@@ -927,7 +947,7 @@ + GetSystemBitness(void) + { + char buf[MAX_ARCH_NAME_LEN] = { 0 }; +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) + int mib[2]; + size_t len; + diff --git a/sysutils/open-vm-tools/patches/patch-ak b/sysutils/open-vm-tools/patches/patch-ak new file mode 100644 index 00000000000..303c37b898f --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ak @@ -0,0 +1,14 @@ +$NetBSD: patch-ak,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/osNames.h 2007/09/28 19:25:17 1.1 ++++ lib/include/osNames.h 2007/09/28 19:25:53 +@@ -127,6 +127,9 @@ + /* FreeBSD */ + #define STR_OS_FREEBSD "FreeBSD" + ++/* NetBSD */ ++#define STR_OS_NETBSD "NetBSD" ++ + /* Solaris */ + #define STR_OS_SOLARIS "Solaris" + diff --git a/sysutils/open-vm-tools/patches/patch-al b/sysutils/open-vm-tools/patches/patch-al new file mode 100644 index 00000000000..68101a6d160 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-al @@ -0,0 +1,21 @@ +$NetBSD: patch-al,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/hgfsUtil.h 2007/09/28 21:35:00 1.1 ++++ lib/include/hgfsUtil.h 2007/09/28 21:36:02 +@@ -39,6 +39,7 @@ + !defined(__timespec_defined) && \ + !defined(sun) && \ + !defined(__FreeBSD__) && \ ++ !defined(__NetBSD__) && \ + !__APPLE__ && \ + !defined(_WIN32) + struct timespec { +@@ -75,7 +76,7 @@ + /* + * Older FreeBSDs do not define EPROTO, so we'll define our own error code. + */ +-#if defined(__FreeBSD__) && !defined(EPROTO) ++#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(EPROTO) + #define EPROTO (ELAST + 1) + #endif + diff --git a/sysutils/open-vm-tools/patches/patch-am b/sysutils/open-vm-tools/patches/patch-am new file mode 100644 index 00000000000..532ad976e50 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-am @@ -0,0 +1,62 @@ +$NetBSD: patch-am,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/misc/idLinux.c 2007/09/28 21:37:59 1.1 ++++ lib/misc/idLinux.c 2007/09/28 21:39:55 +@@ -85,7 +85,7 @@ + #endif + + +-#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) ++#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) + /* + *---------------------------------------------------------------------------- + * +@@ -149,6 +149,9 @@ + #elif defined(__FreeBSD__) + Warning("XXXFreeBSD: implement %s\n", __FUNCTION__); + return -1; ++#elif defined(__NetBSD__) ++ Warning("XXXNetBSD: implement %s\n", __FUNCTION__); ++ return -1; + #else + if (uid32) { + int r = syscall(SYS_setgid32, egid); +@@ -193,6 +196,9 @@ + #elif defined(__FreeBSD__) + Warning("XXXFreeBSD: implement %s\n", __FUNCTION__); + return -1; ++#elif defined(__NetBSD__) ++ Warning("XXXNetBSD: implement %s\n", __FUNCTION__); ++ return -1; + #else + if (uid32) { + int r = syscall(SYS_setresuid32, uid, euid, suid); +@@ -235,6 +241,9 @@ + #elif defined(__FreeBSD__) + Warning("XXXFreeBSD: implement %s\n", __FUNCTION__); + return -1; ++#elif defined(__NetBSD__) ++ Warning("XXXNetBSD: implement %s\n", __FUNCTION__); ++ return -1; + #else + if (uid32) { + int r = syscall(SYS_setresgid32, gid, egid, sgid); +@@ -281,6 +290,9 @@ + #elif defined(__FreeBSD__) + Warning("XXXFreeBSD: implement %s\n", __FUNCTION__); + return -1; ++#elif defined(__NetBSD__) ++ Warning("XXXNetBSD: implement %s\n", __FUNCTION__); ++ return -1; + #else + if (uid32) { + int r = syscall(SYS_setreuid32, uid, euid); +@@ -294,7 +306,7 @@ + } + + +-#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) ++#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) + /* + *---------------------------------------------------------------------------- + * diff --git a/sysutils/open-vm-tools/patches/patch-an b/sysutils/open-vm-tools/patches/patch-an new file mode 100644 index 00000000000..d254c3368a5 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-an @@ -0,0 +1,31 @@ +$NetBSD: patch-an,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/netUtil/netUtilLinux.c 2007/09/28 21:41:22 1.1 ++++ lib/netUtil/netUtilLinux.c 2007/09/28 21:43:27 +@@ -32,7 +32,7 @@ + #endif + + +-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + # error This file should not be compiled + #endif + +@@ -59,7 +59,7 @@ + #include <net/if.h> + #include <sys/ioctl.h> + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__NetBSD__) + #include "ifaddrs.h" + #endif + +@@ -94,7 +94,7 @@ + *---------------------------------------------------------------------- + */ + +-#ifndef __FreeBSD__ /* { */ ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) + char * + NetUtil_GetPrimaryIP(void) + { diff --git a/sysutils/open-vm-tools/patches/patch-ao b/sysutils/open-vm-tools/patches/patch-ao new file mode 100644 index 00000000000..6fcda403bc0 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ao @@ -0,0 +1,31 @@ +$NetBSD: patch-ao,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/procMgr/procMgrPosix.c 2007/09/28 21:44:48 1.1 ++++ lib/procMgr/procMgrPosix.c 2007/09/28 21:45:36 +@@ -32,7 +32,7 @@ + // pull in setresuid()/setresgid() if possible + #define _GNU_SOURCE + #include <unistd.h> +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + #include <asm/param.h> + #include <locale.h> + #include <sys/stat.h> +@@ -141,7 +141,7 @@ + ProcMgr_ListProcesses(void) + { + ProcMgr_ProcList *procList = NULL; +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + Bool failed = FALSE; + DynBuf dbProcId; + DynBuf dbProcCmd; +@@ -755,7 +755,7 @@ + /* + * if its not linux, assume its gone + */ +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + char procname[256]; + int ret; + struct stat st; diff --git a/sysutils/open-vm-tools/patches/patch-ap b/sysutils/open-vm-tools/patches/patch-ap new file mode 100644 index 00000000000..b57fe06d6cd --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ap @@ -0,0 +1,15 @@ +$NetBSD: patch-ap,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/string/str.c 2007/09/28 21:47:18 1.1 ++++ lib/string/str.c 2007/09/28 21:48:13 +@@ -37,6 +37,10 @@ + #include "bsd_output.h" + #endif + ++#ifdef __NetBSD__ ++#include <wchar.h> ++#endif ++ + #if defined _WIN32 && !defined HAS_BSD_PRINTF + #define vsnprintf _vsnprintf + #endif diff --git a/sysutils/open-vm-tools/patches/patch-aq b/sysutils/open-vm-tools/patches/patch-aq new file mode 100644 index 00000000000..bea05e20f67 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-aq @@ -0,0 +1,22 @@ +$NetBSD: patch-aq,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/system/systemLinux.c 2007/09/29 08:14:52 1.1 ++++ lib/system/systemLinux.c 2007/09/29 08:16:09 +@@ -32,7 +32,7 @@ + #endif + + +-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + # error This file should not be compiled + #endif + +@@ -59,7 +59,7 @@ + #include <net/if.h> + #include <sys/ioctl.h> + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__NetBSD__) + #include "ifaddrs.h" + #endif + diff --git a/sysutils/open-vm-tools/patches/patch-ar b/sysutils/open-vm-tools/patches/patch-ar new file mode 100644 index 00000000000..4d6985abd57 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ar @@ -0,0 +1,38 @@ +$NetBSD: patch-ar,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/user/hostinfoPosix.c 2007/09/29 10:16:41 1.1 ++++ lib/user/hostinfoPosix.c 2007/09/29 10:19:15 +@@ -694,8 +694,8 @@ + e = s + strlen(s); + + /* Skip leading and trailing while spaces */ +- for (; s < e && isspace(*s); s++); +- for (; s < e && isspace(e[-1]); e--); ++ for (; s < e && isspace((unsigned)*s); s++); ++ for (; s < e && isspace((unsigned)e[-1]); e--); + *e = 0; + + /* Free previous value */ +@@ -1071,7 +1071,9 @@ + { + int s, fd; + struct sigaction sa; ++#ifdef RLIMIT_AS + struct rlimit rlim; ++#endif + #ifdef __linux__ + int err; + uid_t euid; +@@ -1095,10 +1097,12 @@ + } + } + ++#ifdef RLIMIT_AS + if (getrlimit(RLIMIT_AS, &rlim) == 0) { + rlim.rlim_cur = rlim.rlim_max; + setrlimit(RLIMIT_AS, &rlim); + } ++#endif + + #ifdef __linux__ + /* diff --git a/sysutils/open-vm-tools/patches/patch-as b/sysutils/open-vm-tools/patches/patch-as new file mode 100644 index 00000000000..4135fafd93b --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-as @@ -0,0 +1,72 @@ +$NetBSD: patch-as,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/wiper/wiperPosix.c 2007/09/29 12:46:28 1.1 ++++ lib/wiper/wiperPosix.c 2007/09/29 12:48:36 +@@ -23,7 +23,7 @@ + * + */ + +-#if !defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__APPLE__) ++#if !defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__NetBSD__) + #error This file should not be compiled on this platform. + #endif + +@@ -31,12 +31,12 @@ + #include <sys/stat.h> + #if defined(__linux__) || defined(sun) + # include <sys/vfs.h> +-#elif defined(__FreeBSD__) || defined(__APPLE__) ++#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) + # include <sys/param.h> + # include <sys/ucred.h> + # include <sys/mount.h> + # include <fstab.h> +-# if BSD_VERSION >= 50 ++# if defined(__FreeBSD__) && BSD_VERSION >= 50 + # include <libgen.h> + # endif /* BSD_VERSION < 50 */ + #endif +@@ -65,7 +65,7 @@ + + #if defined(sun) || defined(__linux__) + # define PROCFS "proc" +-#elif defined(__FreeBSD__) || defined(__APPLE__) ++#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) + # define PROCFS "procfs" + #endif + +@@ -195,7 +195,7 @@ + return TRUE; + } + +-#elif defined(__FreeBSD__) || defined(__APPLE__) /* } FreeBSD { */ ++#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) /* } FreeBSD { */ + + static INLINE Bool + WiperIsDiskDevice(MNTINFO *mnt, // IN: file system being considered +@@ -209,7 +209,7 @@ + * function, as a whole, does not even apply to OS X, so this caveat is + * only minor. + */ +-#if BSD_VERSION < 50 ++#if defined(__NetBSD__) || BSD_VERSION < 50 + /* + * Before FreeBSD 5, device nodes had static major/minor numbers. + * (FreeBSD 5 included devfs which got rid of this concept.) So +@@ -509,14 +509,14 @@ + uint64 *free, // OUT + uint64 *total) // OUT + { +-#ifdef sun ++#if defined(sun) || defined(__NetBSD__) + struct statvfs statfsbuf; + #else + struct statfs statfsbuf; + #endif + ASSERT(p); + +-#ifdef sun ++#if defined(sun) || defined(__NetBSD__) + if (statvfs(p->mountPoint, &statfsbuf) < 0) { + #else + if (statfs(p->mountPoint, &statfsbuf) < 0) { diff --git a/sysutils/open-vm-tools/patches/patch-at b/sysutils/open-vm-tools/patches/patch-at new file mode 100644 index 00000000000..615b9b701b7 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-at @@ -0,0 +1,57 @@ +$NetBSD: patch-at,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/mntinfo.h 2007/09/29 12:49:29 1.1 ++++ lib/include/mntinfo.h 2007/09/29 12:52:41 +@@ -34,7 +34,7 @@ + # include <limits.h> + #elif defined(__linux__) + # include <mntent.h> +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__NetBSD__) + # include <sys/mount.h> + #endif + +@@ -105,17 +105,27 @@ + # define MNTINFO_FSTYPE(mnt) mnt->mnt_type + # define MNTINFO_MNTPT(mnt) mnt->mnt_dir + # define MNTINFO_MNT_IS_RO(mnt) (hasmntopt((mnt), "rw") == NULL) +-#elif defined(__FreeBSD__) || defined(__APPLE__) ++#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) + struct mntHandle { ++# if defined(__NetBSD__) ++ struct statvfs *mountPoints; // array of mountpoints per getmntinfo(3) ++# else + struct statfs *mountPoints; // array of mountpoints per getmntinfo(3) ++# endif + int numMountPoints; // number of elements in mntArray + int mountIndex; // current location within mountPoints array + }; + # define MNTFILE _PATH_FSTAB + # define MNTHANDLE struct mntHandle * +-# define MNTINFO struct statfs +-# define DECLARE_MNTINFO(name) struct statfs __ ## name; \ ++# if defined(__NetBSD__) ++# define MNTINFO struct statvfs ++# define DECLARE_MNTINFO(name) struct statvfs __ ## name; \ ++ struct statvfs *name = &__ ## name ++# else ++# define MNTINFO struct statfs ++# define DECLARE_MNTINFO(name) struct statfs __ ## name; \ + struct statfs *name = &__ ## name ++# endif + + # define OPEN_MNTFILE(mode) \ + ({ \ +@@ -150,7 +160,11 @@ + # define MNTINFO_NAME(mnt) mnt->f_mntfromname + # define MNTINFO_FSTYPE(mnt) mnt->f_fstypename + # define MNTINFO_MNTPT(mnt) mnt->f_mntonname +-# define MNTINFO_MNT_IS_RO(mnt) ((mnt)->f_flags & MNT_RDONLY) ++# if defined(__NetBSD__) ++# define MNTINFO_MNT_IS_RO(mnt) ((mnt)->f_flag & MNT_RDONLY) ++# else ++# define MNTINFO_MNT_IS_RO(mnt) ((mnt)->f_flags & MNT_RDONLY) ++# endif + #else + # error "Define mount information macros for your OS type" + #endif diff --git a/sysutils/open-vm-tools/patches/patch-au b/sysutils/open-vm-tools/patches/patch-au new file mode 100644 index 00000000000..e5bdcafea86 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-au @@ -0,0 +1,13 @@ +$NetBSD: patch-au,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- guestd/foreignVMToolsDaemon.c 2007/09/29 13:01:02 1.1 ++++ guestd/foreignVMToolsDaemon.c 2007/09/29 13:01:37 +@@ -56,7 +56,7 @@ + #include <netinet/tcp.h> + #include <arpa/inet.h> + #include <fcntl.h> +-#if defined(__FreeBSD__) || defined(sun) ++#if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + #include <unistd.h> + #else + #include <linux/unistd.h> diff --git a/sysutils/open-vm-tools/patches/patch-av b/sysutils/open-vm-tools/patches/patch-av new file mode 100644 index 00000000000..d74d160acaa --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-av @@ -0,0 +1,13 @@ +$NetBSD: patch-av,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- guestd/foreignVMToolsDaemon.h 2007/09/29 13:02:18 1.1 ++++ guestd/foreignVMToolsDaemon.h 2007/09/29 13:02:45 +@@ -60,7 +60,7 @@ + + #ifdef __APPLE__ + #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE +-#elif defined(__FreeBSD__) || defined(sun) ++#elif defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + #include <unistd.h> + #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE + #else diff --git a/sysutils/open-vm-tools/patches/patch-aw b/sysutils/open-vm-tools/patches/patch-aw new file mode 100644 index 00000000000..cadbdbdb32d --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-aw @@ -0,0 +1,13 @@ +$NetBSD: patch-aw,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/iovector.h 2007/09/29 13:04:52 1.1 ++++ lib/include/iovector.h 2007/09/29 13:07:40 +@@ -32,7 +32,7 @@ + /* + * Ugly definition of struct iovec. + */ +-#if __linux__ || sun || __APPLE__ ++#if __linux__ || sun || __APPLE__ || __NetBSD__ + #include <sys/uio.h> // for struct iovec + #else // if __linux__ || sun || __APPLE__ + diff --git a/sysutils/open-vm-tools/patches/patch-ax b/sysutils/open-vm-tools/patches/patch-ax new file mode 100644 index 00000000000..2e2856c4274 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ax @@ -0,0 +1,112 @@ +$NetBSD: patch-ax,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- guestd/main.c 2007/09/29 13:11:05 1.1 ++++ guestd/main.c 2007/09/29 13:12:20 +@@ -39,7 +39,7 @@ + #include <sys/wait.h> + #include <errno.h> + #include <stdlib.h> +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + #include <utmp.h> + #include <pwd.h> + #include <grp.h> +@@ -79,7 +79,7 @@ + #include "vmstdio.h" + #include "vmBackup.h" + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + #include "socketMgr.h" + #include "dnd.h" + #endif +@@ -126,7 +126,7 @@ + # define HGFS_MOUNT_FLAGS MS_DATA /* from <sys/mount.h> */ + #endif + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + #define VMWAREUSER_CHECK_TIME 1000 /* 10 seconds */ + #define XAUTOSTART_CONF "xautostart.conf" + #define NR_XBLESSED_APP_DEFAULT 2 +@@ -158,7 +158,7 @@ + * Global variables + */ + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + static const char *gBinDir; + static char *gDefaultBlessedApp[] = { + XBLESSED_APP1_DEFAULT, +@@ -525,7 +525,7 @@ + #endif /* sun */ + + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + /* + *---------------------------------------------------------------------- + * +@@ -1496,7 +1496,7 @@ + int maxFd; /* Max fd of all Fd sets */ + fd_set readFds; /* Read fd set to select on */ + fd_set writeFds; +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + SocketSelectable *sockReadFds = NULL; + SocketSelectable *sockWriteFds = NULL; + int numSockReadFds = 0; +@@ -1539,7 +1539,7 @@ + } + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + SocketMgr_GetSelectables(SOCKETMGR_IN, + &sockReadFds, + &numSockReadFds); +@@ -1597,7 +1597,7 @@ + curAsyncProc = NULL; + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + for (index = 0; index < numSockReadFds; index++) { + if (FD_ISSET(sockReadFds[index], &readFds)) { + SocketMgr_ProcessSelectable(sockReadFds[index], SOCKETMGR_IN); +@@ -1612,7 +1612,7 @@ + #endif + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + free((void *) sockReadFds); + free((void *) sockWriteFds); + #endif +@@ -1641,7 +1641,7 @@ + GuestdDaemon(GuestApp_Dict **pConfDict, // IN/OUT + int *gDaemonSignalPtr) // IN/OUT + { +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + pid_t vmwareuserPid = 0; + #endif + ToolsDaemon_Data *data = NULL; +@@ -1695,7 +1695,7 @@ + GuestApp_GetDictEntryBool(*pConfDict, CONFNAME_DISABLEQUERYDISKINFO)); + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + gBinDir = GuestApp_GetDictEntry(*pConfDict, CONFNAME_BINDIR); + if (gBinDir == NULL) { + gBinDir = "/usr/bin"; +@@ -1775,7 +1775,7 @@ + ToolsDaemon_Cleanup(data); + } + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + if (vmwareuserPid != 0) { + kill(vmwareuserPid, SIGTERM); + } diff --git a/sysutils/open-vm-tools/patches/patch-ay b/sysutils/open-vm-tools/patches/patch-ay new file mode 100644 index 00000000000..31f7e2a5edf --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ay @@ -0,0 +1,49 @@ +$NetBSD: patch-ay,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/file/fileIO.c 2007/09/29 13:15:17 1.1 ++++ lib/file/fileIO.c 2007/09/29 13:16:06 +@@ -241,7 +241,7 @@ + * Lock the file if necessary. + */ + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + if (access & FILEIO_OPEN_LOCKED) { + int err; + +@@ -264,7 +264,7 @@ + } + #else + ASSERT(file->lockToken == NULL); +-#endif // !__FreeBSD__ && !sun ++#endif // !__FreeBSD__ && !sun && !defined(__NetBSD__) + + return ret; + } +@@ -292,7 +292,7 @@ + { + FileIOResult ret = FILEIO_SUCCESS; + +-#if !defined(__FreeBSD__) && !defined(sun) ++#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__) + if (file->lockToken != NULL) { + int err; + +@@ -309,7 +309,7 @@ + } + #else + ASSERT(file->lockToken == NULL); +-#endif // !__FreeBSD__ && !sun ++#endif // !__FreeBSD__ && !sun && !defined(__NetBSD__) + + return ret; + } +@@ -419,7 +419,7 @@ + /* + * Pwrite & Pread are not available in the FreeBSD tools build VM + */ +-#if !defined(VMX86_TOOLS) || !defined(__FreeBSD__) ++#if !defined(VMX86_TOOLS) || !defined(__FreeBSD__) && !defined(__NetBSD__) + #if _WIN32 || defined(GLIBC_VERSION_21) || __APPLE__ + /* + *---------------------------------------------------------------------- diff --git a/sysutils/open-vm-tools/patches/patch-az b/sysutils/open-vm-tools/patches/patch-az new file mode 100644 index 00000000000..30876ba740f --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-az @@ -0,0 +1,38 @@ +$NetBSD: patch-az,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/include/vmblock.h 2007/09/29 13:18:10 1.1 ++++ lib/include/vmblock.h 2007/09/29 13:19:22 +@@ -25,12 +25,13 @@ + #ifndef _VMBLOCK_H_ + #define _VMBLOCK_H_ + +-#if defined(sun) || defined(__FreeBSD__) ++#if defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) + # include <sys/ioccom.h> + #endif + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) + # include <sys/param.h> ++# include <sys/ioctl.h> + #endif + + #define VMBLOCK_FS_NAME "vmblock" +@@ -53,7 +54,7 @@ + # define VMBLOCK_DEVICE_MODE O_WRONLY + # define VMBLOCK_CONTROL(fd, op, path) write(fd, path, op) + +-#elif defined(sun) || defined(__FreeBSD__) ++#elif defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) + # define VMBLOCK_MOUNT_POINT "/var/run/" VMBLOCK_FS_NAME + # define VMBLOCK_DEVICE VMBLOCK_MOUNT_POINT + # define VMBLOCK_DEVICE_MODE O_RDONLY +@@ -70,7 +71,7 @@ + # endif + # define VMBLOCK_CONTROL(fd, op, path) ioctl(fd, op, path) + +-# elif defined(__FreeBSD__) /* } else if (FreeBSD) { */ ++# elif defined(__FreeBSD__) || defined(__NetBSD__) /* } else if (FreeBSD) { */ + /* + * Similar to Solaris, construct ioctl(2) commands for block operations. + * Since the FreeBSD implementation does not change the user's passed-in diff --git a/sysutils/open-vm-tools/patches/patch-ba b/sysutils/open-vm-tools/patches/patch-ba new file mode 100644 index 00000000000..290dd4e2aa1 --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-ba @@ -0,0 +1,13 @@ +$NetBSD: patch-ba,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- vmware-user/foreignVMToolsDaemon.h 2007/09/30 10:16:08 1.1 ++++ vmware-user/foreignVMToolsDaemon.h 2007/09/30 10:16:49 +@@ -60,7 +60,7 @@ + + #ifdef __APPLE__ + #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE +-#elif defined(__FreeBSD__) || defined(sun) ++#elif defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + #include <unistd.h> + #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE + #else diff --git a/sysutils/open-vm-tools/patches/patch-bb b/sysutils/open-vm-tools/patches/patch-bb new file mode 100644 index 00000000000..f7252a7766b --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-bb @@ -0,0 +1,13 @@ +$NetBSD: patch-bb,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- vmware-user/foreignVMToolsDaemon.c 2007/09/30 12:24:28 1.1 ++++ vmware-user/foreignVMToolsDaemon.c 2007/09/30 12:25:01 +@@ -56,7 +56,7 @@ + #include <netinet/tcp.h> + #include <arpa/inet.h> + #include <fcntl.h> +-#if defined(__FreeBSD__) || defined(sun) ++#if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__) + #include <unistd.h> + #else + #include <linux/unistd.h> diff --git a/sysutils/open-vm-tools/patches/patch-bc b/sysutils/open-vm-tools/patches/patch-bc new file mode 100644 index 00000000000..c98d6332cff --- /dev/null +++ b/sysutils/open-vm-tools/patches/patch-bc @@ -0,0 +1,22 @@ +$NetBSD: patch-bc,v 1.1.1.1 2007/10/17 21:35:53 agc Exp $ + +--- lib/dnd/dndLinux.c 2007/09/30 13:19:05 1.1 ++++ lib/dnd/dndLinux.c 2007/09/30 13:19:37 +@@ -37,7 +37,7 @@ + #include "util.h" + #include "escape.h" + #include "su.h" +-#if defined(linux) || defined(sun) || defined(__FreeBSD__) ++#if defined(linux) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) + #include "vmblock.h" + #include "mntinfo.h" + #endif +@@ -327,7 +327,7 @@ + + + /* We need to make this suck less. */ +-#if defined(linux) || defined(sun) || defined(__FreeBSD__) ++#if defined(linux) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) + /* + *---------------------------------------------------------------------------- + * |