Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,44 @@
# $NetBSD: Makefile,v 1.40 2013/06/06 12:55:05 wiz Exp $
DISTNAME= open-vm-tools-2008.08.08-109361
PKGNAME= open-vm-tools-2008.08.08.109361
PKGREVISION= 31
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
ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64
GNU_CONFIGURE= yes
USE_LANGUAGES+= c c++
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config autoconf automake
PLIST_SRC= PLIST.common
CONFIGURE_ARGS+= --disable-unity
INSTALLATION_DIRS+= ${PKG_SYSCONFDIR} share/examples/vmware-tools
PKG_SYSCONFSUBDIR= vmware-tools
EGDIR= ${PREFIX}/share/examples/vmware-tools
CONF_FILES_PERMS+= ${EGDIR}/poweroff-vm-default ${PKG_SYSCONFDIR}/poweroff-vm-default ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/poweron-vm-default ${PKG_SYSCONFDIR}/poweron-vm-default ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/resume-vm-default ${PKG_SYSCONFDIR}/resume-vm-default ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/suspend-vm-default ${PKG_SYSCONFDIR}/suspend-vm-default ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/tools.conf ${PKG_SYSCONFDIR}/tools.conf ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
RCD_SCRIPTS= vmtools
pre-configure:
cd ${WRKSRC} && autoreconf -f
.include "../../net/libdnet/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
.include "options.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,13 @@
@comment $NetBSD: PLIST.common,v 1.1 2008/08/31 06:36:47 scottr Exp $
bin/vmware-checkvm
bin/vmware-hgfsclient
bin/vmware-toolbox-cmd
bin/vmware-xferlogs
lib/libguestlib.la
sbin/vmware-guestd
share/examples/rc.d/vmtools
share/examples/vmware-tools/poweroff-vm-default
share/examples/vmware-tools/poweron-vm-default
share/examples/vmware-tools/resume-vm-default
share/examples/vmware-tools/suspend-vm-default
share/examples/vmware-tools/tools.conf

View File

@@ -0,0 +1,5 @@
@comment $NetBSD: PLIST.x11,v 1.1 2008/08/31 06:36:47 scottr Exp $
bin/vmware-toolbox
bin/vmware-user
bin/vmware-user-suid-wrapper
share/applications/vmware-user.desktop

View File

@@ -0,0 +1,70 @@
$NetBSD: distinfo,v 1.7 2013/04/01 12:25:16 joerg Exp $
SHA1 (open-vm-tools-2008.08.08-109361.tar.gz) = 1c44c3524cd9cbc5870f1c6065b03a6b31859a25
RMD160 (open-vm-tools-2008.08.08-109361.tar.gz) = 4ea0a6aa2edda2bc404c865dc5b58f3a177ae411
Size (open-vm-tools-2008.08.08-109361.tar.gz) = 2971141 bytes
SHA1 (patch-ac) = 141db2136d1068408ca3470e11d35233f936a11c
SHA1 (patch-ad) = 4ec9292667918c23ef182ae05d5f8417d9af7673
SHA1 (patch-ae) = 785a5d5d27ce6f8281caa56a27f90a3b200ac082
SHA1 (patch-af) = 7ead621ec1b8987e64ceaa73909c74927e50330f
SHA1 (patch-ag) = 6d5d462934942ec8b7439e2e51d179e627833111
SHA1 (patch-ah) = 18577d28bea81a036495d3f86b4713b8a1003fdc
SHA1 (patch-ai) = 59cdf9ae813aa9ac0cf5920e19cbfd23b720b50b
SHA1 (patch-aj) = ee2e2bfc5f976d00fb4a830184e37427852a90d3
SHA1 (patch-ak) = d27cd0cbbf2db45a07a8bf4a006ad5e28feb8b3a
SHA1 (patch-al) = 0342d300f6c27a3a523f80f06d087c60c68b9a53
SHA1 (patch-am) = a4d678ad7e163de381a547cad1c24bca08c72a73
SHA1 (patch-an) = abd94ec83c54e4ee1e64a34996db21ce86cf7ae3
SHA1 (patch-ao) = 5d6457e994f559fd826811644d2e77f46ce10d1e
SHA1 (patch-ap) = ca1a6efeaa90cf6e759e2d27ff3b2da8ffef63d0
SHA1 (patch-aq) = 18a3072f2c307ed35e5c2356e5656c0ce5f19dc0
SHA1 (patch-ar) = aa98d78890c9fb46c18f727ba3609ad562c01480
SHA1 (patch-as) = 45e3957d07227c8fb1741fcf6b15c982e9b52bfd
SHA1 (patch-at) = 659b97c50168fa74f3e6a8ffe2bafae0420f0d49
SHA1 (patch-au) = 31eeee4521020952ef51b29351802efd9fe4297f
SHA1 (patch-av) = b61f165fd9a6e5241795e2e69aa73caba32539a8
SHA1 (patch-aw) = 82788d7ab312ee07abf3e159028b440d41912a14
SHA1 (patch-ax) = 70633d0675b11aea8a8c12edbb765ad7d230276f
SHA1 (patch-ay) = c9c7a7f9871fdc3213bafce05a7433db862ac4a4
SHA1 (patch-az) = 2a8494c8cbfb0270a5fdd46e0c5ccaf19fc5f94f
SHA1 (patch-ba) = cb0433af4a7c5c9a9010edbc15998577c44c92ae
SHA1 (patch-bb) = 2dc1b2281eff27965fc83ca20e9c026287227287
SHA1 (patch-bc) = d806bf75979d870db8616fa212e3f619d4508249
SHA1 (patch-bd) = 0af45ab34089ea1d47b15f9dc3ddec129ab98b1a
SHA1 (patch-be) = 29d8fd6b32d622b4ed03efecb4aeb2a35a7c254b
SHA1 (patch-bf) = c14f4c641f6f1536d8ae7cd20995506bb59470b4
SHA1 (patch-bg) = e129e88832690763e4b34cc59c614cf31e79802a
SHA1 (patch-bh) = 723d8bc1a2064572e7ff4768c137830fbb6773d6
SHA1 (patch-bi) = d3749e561947e32b5de2af3acb3ff7c26a47ccb4
SHA1 (patch-bj) = b3c6961c4e8ec54ed2a1c608a8d04e0d38c4176c
SHA1 (patch-bk) = 48d44394dc31d50dc1ffebfac10c813a18a8f094
SHA1 (patch-bl) = 651f31b2c1d056e5090b893d1db7badfdb592561
SHA1 (patch-bm) = 4a0235a64263b1f56a357fe5106a40269a2a11e1
SHA1 (patch-bn) = 12e1bbd0aea73a2df4fd36e7a8ad8006327404ea
SHA1 (patch-bo) = 7480a6016308049eef86aeec8103ccf12733133c
SHA1 (patch-bp) = c577501c0c00dcb8d4b6b8aec8347879aabc0330
SHA1 (patch-bq) = 121e5db459e1e0f5f5dbaa5e0e3a40e7bc8a74a7
SHA1 (patch-br) = 7c14091b3f7a7e75e0d7db654cff1e0476e36888
SHA1 (patch-bs) = 4b2a334ed4611c87b90f2e092cffb88aae058928
SHA1 (patch-bt) = 34c85d8d994c33fb4e18f76bb8b6baa41098f23e
SHA1 (patch-bu) = 9e2533d967cfb1cdc780516359ab8e7c373b70f5
SHA1 (patch-bv) = 180df7c4a5fb7544b6d9014f567a4f31e6c2a38d
SHA1 (patch-bw) = c242890caa3cc720d18eec612aca6e46c69c5b04
SHA1 (patch-bx) = deeea5eefae750b046d7a9c81679125e26fb82fa
SHA1 (patch-by) = c6018a330fdabefd3fc60d3e6e6c95bdf4f7f2bc
SHA1 (patch-checkvm_checkvm.c) = 142e34b40937add51db4f2255f47da23402a3720
SHA1 (patch-configure.ac) = d39767cc2006088203341782fca7895c2710fd55
SHA1 (patch-guestd_Makefile.am) = 4855efa62b6633e23c11e3ea184f60f4c6952244
SHA1 (patch-hgfsclient_Makefile.am) = 3b6adf9e4d88bcce2c191260b669615537927e28
SHA1 (patch-lib_hgfsServer_hgfsServer.c) = 68a3102d4f53626717f64284eb5e51bfb584e783
SHA1 (patch-lib_hgfsServer_hgfsServerLinux.c) = ef5a3135a8e4dc9f16d93d6eb7d88b8194aa0907
SHA1 (patch-lib_panic_panic.c) = f784479ef9000e67389c04ca80ad22da5e3a2165
SHA1 (patch-lib_vmCheck_Makefile.am) = 5956c6e81d6ea5679d949083fcf60066d8374672
SHA1 (patch-lib_vmSignal_Makefile.am) = 6c562e558f846666ed9da3298f15a9cd489bd75f
SHA1 (patch-libguestlib_Makefile.am) = d46ae6b600831b3f7ecd39f675fbf480a7882e60
SHA1 (patch-scripts_Makefile.am) = 18bac57a5bfed9883734fdc58a4d6214b6614d92
SHA1 (patch-toolbox_Makefile.am) = cc0d0f3a0b2b269da903ff6918d329ce74158d17
SHA1 (patch-toolbox_toolboxcmd-stat.c) = 17d1188de53cea4897fc1d08a02d9db06f6bbc28
SHA1 (patch-vmware-user_Makefile.am) = 20c389aa42c5419106e1d6619e812725602ead6c
SHA1 (patch-vmware-user_copyPaste.c) = 58286d54e72d9290fc9392212d37c0c406a4e6f8
SHA1 (patch-vmware-user_dnd.c) = 9d2b242b5e5042f12440ccbf44b10367a8184b0b

View File

@@ -0,0 +1,18 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: vmtools.sh,v 1.1 2008/08/31 06:36:47 scottr Exp $
#
# PROVIDE: vmtools
# REQUIRE: DAEMON
$_rc_subr_loaded . /etc/rc.subr
name="vmtools"
rcvar="vmtools"
pidfile="/var/run/vmware-guestd.pid"
command="@PREFIX@/sbin/vmware-guestd"
command_args="--background ${pidfile}"
load_rc_config $name
run_rc_command "$1"

View File

@@ -0,0 +1,19 @@
# $NetBSD: options.mk,v 1.2 2010/12/16 11:52:15 obache Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.open-vm-tools
PKG_SUPPORTED_OPTIONS= x11
PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mx11)
PLIST_SRC+= PLIST.x11
. 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 "../../sysutils/desktop-file-utils/desktopdb.mk"
.else
CONFIGURE_ARGS+= --without-x
.endif

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-ac,v 1.3 2012/12/25 21:02:15 joerg Exp $
--- guestd/foreignVMToolsDaemon.c.orig 2008-08-08 07:01:56.000000000 +0000
+++ guestd/foreignVMToolsDaemon.c
@@ -55,7 +55,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <fcntl.h>
-#if defined(__FreeBSD__) || defined(sun) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(sun) || defined(__APPLE__) || defined(__NetBSD__)
#include <unistd.h>
#else
#include <linux/unistd.h>
@@ -833,8 +833,7 @@ ForeignToolsSetProperties(ForeignVMTools
* Do some validation
*/
if ((NULL == asyncCommand)
- || (NULL == requestMsg)
- || (0 > requestMsg->bufferSize)) {
+ || (NULL == requestMsg)) {
err = VIX_E_INVALID_ARG;
goto abort;
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-ad,v 1.3 2012/12/25 21:02:15 joerg Exp $
--- guestd/foreignVMToolsDaemon.h.orig 2008-08-08 07:01:56.000000000 +0000
+++ guestd/foreignVMToolsDaemon.h
@@ -59,7 +59,7 @@ VixError VIX_INIT_LOCK(VixLockType *lock
#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
@@ -72,7 +72,7 @@ VixError VIX_INIT_LOCK(VixLockType *lock
typedef pthread_mutex_t VixLockType;
static INLINE VixError VIX_INIT_LOCK(VixLockType *lockPtr);
-VixError VIX_INIT_LOCK(VixLockType *lockPtr)
+static INLINE VixError VIX_INIT_LOCK(VixLockType *lockPtr)
{
int result;
pthread_mutexattr_t attr;

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-ae,v 1.2 2008/08/31 06:36:47 scottr Exp $
--- guestd/main.c.orig 2008-08-08 02:01:56.000000000 -0500
+++ guestd/main.c
@@ -59,7 +59,7 @@
#include "vmBackup.h"
#include "codeset.h"
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
#include "socketMgr.h"
#endif
@@ -864,7 +864,7 @@ GuestdSleep(uint64 numUsecs,
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) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
SocketSelectable *sockReadFds = NULL;
SocketSelectable *sockWriteFds = NULL;
int numSockReadFds = 0;
@@ -911,7 +911,7 @@ GuestdSleep(uint64 numUsecs,
}
#endif
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
SocketMgr_GetSelectables(SOCKETMGR_IN,
&sockReadFds,
&numSockReadFds);
@@ -969,7 +969,7 @@ GuestdSleep(uint64 numUsecs,
curAsyncProc = NULL;
}
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
for (index = 0; index < numSockReadFds; index++) {
if (FD_ISSET(sockReadFds[index], &readFds)) {
SocketMgr_ProcessSelectable(sockReadFds[index], SOCKETMGR_IN);
@@ -984,7 +984,7 @@ GuestdSleep(uint64 numUsecs,
#endif
}
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
free((void *) sockReadFds);
free((void *) sockWriteFds);
#endif

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-af,v 1.2 2008/08/31 06:36:47 scottr Exp $
--- lib/dnd/dndLinux.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/dnd/dndLinux.c
@@ -39,7 +39,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
@@ -288,7 +288,7 @@ DnD_UriListGetNextFile(char const *uriLi
/* We need to make this suck less. */
-#if defined(linux) || defined(sun) || defined(__FreeBSD__)
+#if defined(linux) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__)
/*
*----------------------------------------------------------------------------
*

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ag,v 1.2 2008/08/31 06:36:47 scottr Exp $
--- lib/dynxdr/dynxdr.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/dynxdr/dynxdr.c
@@ -54,7 +54,7 @@ typedef struct DynXdrData {
* Mac OS X, FreeBSD and Solaris don't take a const parameter to the
* "x_getpostn" function.
*/
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun) | defined(__NetBSD__)
# define DYNXDR_GETPOS_CONST
#else
# define DYNXDR_GETPOS_CONST const

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-ah,v 1.2 2008/08/31 06:36:47 scottr Exp $
--- lib/file/fileIO.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/file/fileIO.c
@@ -254,7 +254,7 @@ FileIO_Lock(FileIODescriptor *file, // I
ASSERT(file);
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
if (access & FILEIO_OPEN_LOCKED) {
int err;
@@ -286,7 +286,7 @@ FileIO_Lock(FileIODescriptor *file, // I
}
#else
ASSERT(file->lockToken == NULL);
-#endif // !__FreeBSD__ && !sun
+#endif // !__FreeBSD__ && !sun && !defined(__NetBSD__)
return ret;
}
@@ -316,7 +316,7 @@ FileIO_Unlock(FileIODescriptor *file)
ASSERT(file);
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
if (file->lockToken != NULL) {
int err;
@@ -333,7 +333,7 @@ FileIO_Unlock(FileIODescriptor *file)
}
#else
ASSERT(file->lockToken == NULL);
-#endif // !__FreeBSD__ && !sun
+#endif // !__FreeBSD__ && !sun && !defined(__NetBSD__)
return ret;
}
@@ -449,7 +449,7 @@ FileIO_StatsExit(const FileIODescriptor
/*
* 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 defined(_WIN32) || defined(GLIBC_VERSION_21) || defined(__APPLE__)
/*
*----------------------------------------------------------------------

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-ai,v 1.2 2008/08/31 06:36:47 scottr Exp $
--- lib/file/fileIOPosix.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/file/fileIOPosix.c
@@ -62,7 +62,7 @@
#include <dlfcn.h>
#include <sys/xattr.h>
#else
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/param.h>
#include <sys/mount.h>
#else
@@ -720,7 +720,7 @@ FileIO_Create(FileIODescriptor *file,
ASSERT(file->lockToken == NULL);
ASSERT_ON_COMPILE(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
@@ -1248,7 +1248,7 @@ FileIO_Sync(const FileIODescriptor *file
/*
* 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__))
/*

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-aj,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/file/fileLockPosix.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/file/fileLockPosix.c
@@ -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>
@@ -121,7 +121,7 @@ FileLock_Init(int lockerPid,
fileLockOptions.userWorld = userWorld;
}
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
/*
*----------------------------------------------------------------------
*

View File

@@ -0,0 +1,58 @@
$NetBSD: patch-ak,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/file/filePosix.c.orig 2008-08-08 02:01:54.000000000 -0500
+++ lib/file/filePosix.c
@@ -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 "unicodeOperations.h"
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
#if !defined(__APPLE__)
static char *FilePosixLookupMountPoint(char const *canPath, Bool *bind);
#endif
@@ -320,7 +320,7 @@ FileAttributes(ConstUnicode pathName, /
*----------------------------------------------------------------------
*/
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
Bool
File_IsRemote(ConstUnicode pathName) // IN: Path name
{
@@ -626,7 +626,7 @@ File_GetTimes(ConstUnicode pathName,
* XXX atime is almost always MAX.
*/
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
/*
* FreeBSD: All supported versions have timestamps with nanosecond resolution.
* FreeBSD 5+ has also file creation time.
@@ -788,7 +788,7 @@ File_SetTimes(ConstUnicode pathName,
}
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
/*
*-----------------------------------------------------------------------------
*
@@ -1747,7 +1747,7 @@ File_IsSameFile(ConstUnicode path1, //
}
-#endif /* !FreeBSD && !sun */
+#endif /* !FreeBSD && !sun && !NetBSD */
/*

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-al,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/guestApp/Makefile.in.orig 2008-08-08 02:02:08.000000000 -0500
+++ lib/guestApp/Makefile.in
@@ -248,6 +248,7 @@ libGuestApp_a_SOURCES = guestApp.c guest
@HAVE_X11_TRUE@libGuestAppX11_a_SOURCES = $(libGuestApp_a_SOURCES) \
@HAVE_X11_TRUE@ guestAppPosixX11.c
@HAVE_X11_TRUE@libGuestAppX11_a_CPPFLAGS = -DGUESTAPP_HAS_X11
+CFLAGS += -DGUESTAPP_TOOLS_INSTALL_PATH=\"$(sysconfdir)/vmware-tools\"
all: all-am
.SUFFIXES:

View File

@@ -0,0 +1,20 @@
$NetBSD: patch-am,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/guestApp/guestApp.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/guestApp/guestApp.c
@@ -72,6 +72,7 @@ extern "C" {
* intelligent for that platform as well.
*/
+#if !defined(GUESTAPP_TOOLS_INSTALL_PATH)
#if defined(N_PLAT_NLM)
#define GUESTAPP_TOOLS_INSTALL_PATH "SYS:\\ETC\\VMWTOOL"
#elif defined(_WIN32)
@@ -79,6 +80,7 @@ extern "C" {
#else
#define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
#endif
+#endif
/*
* An option name/value pair stored locally in the guest app.

View File

@@ -0,0 +1,72 @@
$NetBSD: patch-an,v 1.3 2012/12/25 21:02:15 joerg Exp $
--- lib/guestInfo/guestInfoPosix.c.orig 2008-08-08 07:01:52.000000000 +0000
+++ lib/guestInfo/guestInfoPosix.c
@@ -38,10 +38,11 @@
#endif
#include <unistd.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <errno.h>
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
# include <sys/sysctl.h>
#endif
#ifndef NO_DNET
@@ -200,7 +201,7 @@ ReadInterfaceDetails(const struct intf_e
char ipAddress[NICINFO_MAX_IP_LEN];
Str_Sprintf(macAddress, sizeof macAddress,
- addr_ntoa(&entry->intf_link_addr));
+ "%s", addr_ntoa(&entry->intf_link_addr));
nic = GuestInfoAddNicEntry(nicInfo, macAddress);
if (nic == NULL) {
@@ -229,6 +230,7 @@ ReadInterfaceDetails(const struct intf_e
if (ip) {
GuestInfoAddSubnetMask(ip, entry->intf_addr.addr_bits);
}
+#if !defined(__NetBSD__) /* libdnet addr_ntoa() breaks with IPv6 on NetBSD */
} else if (entry->intf_alias_addrs[i].addr_type == ADDR_TYPE_IP6) {
memcpy(ipAddress,
addr_ntoa(&entry->intf_alias_addrs[i]),
@@ -236,6 +238,7 @@ ReadInterfaceDetails(const struct intf_e
GuestInfoAddIpAddress(nic,
ipAddress,
INFO_IP_ADDRESS_FAMILY_IPV6);
+#endif /* defined(__NetBSD__) */
}
}
}
@@ -697,6 +700,20 @@ GuestInfoGetOSName(unsigned int outBufFu
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;
@@ -766,7 +783,7 @@ int
GuestInfo_GetSystemBitness(void)
{
char buf[MAX_ARCH_NAME_LEN] = { 0 };
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
int mib[2];
size_t len;

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ao,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/conf.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/conf.h
@@ -41,6 +41,9 @@
# ifdef sun
# define CONFVAL_HALT_DEFAULT "/usr/sbin/init 5"
# define CONFVAL_REBOOT_DEFAULT "/usr/sbin/init 6"
+# elif defined(__NetBSD__)
+# define CONFVAL_HALT_DEFAULT "/sbin/shutdown -p now"
+# define CONFVAL_REBOOT_DEFAULT "/sbin/shutdown -r now"
# else
# define CONFVAL_HALT_DEFAULT "/sbin/shutdown -h now"
# define CONFVAL_REBOOT_DEFAULT "/sbin/shutdown -r now"

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ap,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/guest_os.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/guest_os.h
@@ -298,6 +298,9 @@ typedef enum GuestOSFamilyType {
/* FreeBSD */
#define STR_OS_FREEBSD "FreeBSD"
+/* NetBSD */
+#define STR_OS_NETBSD "NetBSD"
+
/* Solaris */
#define STR_OS_SOLARIS "Solaris"

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-aq,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/hgfsUtil.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/hgfsUtil.h
@@ -44,6 +44,7 @@
!defined(__timespec_defined) && \
!defined(sun) && \
!defined(__FreeBSD__) && \
+ !defined(__NetBSD__) && \
!__APPLE__ && \
!defined(_WIN32)
struct timespec {
@@ -96,7 +97,7 @@ struct timespec {
/*
* FreeBSD (pre-6.0) does 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

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ar,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/iovector.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/iovector.h
@@ -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__

View File

@@ -0,0 +1,57 @@
$NetBSD: patch-as,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/mntinfo.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/mntinfo.h
@@ -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
#include "posix.h"
@@ -106,17 +106,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) \
({ \
@@ -155,7 +165,11 @@ struct mntHandle {
# 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

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-at,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/posix.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/posix.h
@@ -151,7 +151,7 @@ int Posix_Getgrnam_r(ConstUnicode name,
char *buf, size_t size, struct group **pgr);
#if !defined(sun)
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
int Posix_Mount(ConstUnicode source, ConstUnicode target,
const char *filesystemtype, unsigned long mountflags,
const void *data);
@@ -161,7 +161,7 @@ struct mntent *Posix_Getmntent(FILE *fp)
struct mntent *Posix_Getmntent_r(FILE *fp, struct mntent *m,
char *buf, int size);
-#endif // !defined(__APPLE__) && !defined(__FreeBSD__)
+#endif // !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
#else // !defined(sun)
int Posix_Getmntent(FILE *fp, struct mnttab *mp);

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-au,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/su.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/su.h
@@ -51,7 +51,7 @@ Bool Id_AuthSet(void const *buf, size_t
Bool Id_AuthCheck(char const *right,
char const *localizedDescription);
-#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>
@@ -87,7 +87,11 @@ int Id_SetRESGid(gid_t rgid, gid_t egid,
static INLINE int
Id_SetEUid(uid_t euid)
{
+#if defined(__NetBSD__)
+ return seteuid(euid);
+#else
return Id_SetRESUid((uid_t)-1, euid, (uid_t)-1);
+#endif
}
@@ -111,7 +115,11 @@ Id_SetEUid(uid_t euid)
static INLINE int
Id_SetEGid(gid_t egid)
{
+#if defined(__NetBSD__)
+ return setegid(egid);
+#else
return Id_SetRESGid((gid_t)-1, egid, (gid_t)-1);
+#endif
}
#define IsSuperUser() (0 == geteuid())

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-av,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/util.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/util.h
@@ -55,7 +55,7 @@
/*
* Define the Util_ThreadID type.
*/
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <pthread.h>
typedef pthread_t Util_ThreadID;
#elif defined(_WIN32)
@@ -119,7 +119,7 @@ EXTERN char *Util_GetSafeTmpDir(Bool use
EXTERN int Util_MakeSafeTemp(ConstUnicode tag,
Unicode *presult);
-#if defined(__linux__) || defined(__FreeBSD__) || defined(sun)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__)
EXTERN Bool Util_GetProcessName(pid_t pid, char *bufOut, size_t bufOutSize);
#endif

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-aw,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/vm_atomic.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/vm_atomic.h
@@ -22,8 +22,8 @@
* Atomic power
*/
-#ifndef _ATOMIC_H_
-#define _ATOMIC_H_
+#ifndef _VM_ATOMIC_H_
+#define _VM_ATOMIC_H_
#define INCLUDE_ALLOW_USERLEVEL
#define INCLUDE_ALLOW_VMMEXT
@@ -154,7 +154,8 @@ Atomic_VolatileToAtomic(volatile uint32
__GNUC__ >= 3 && \
!defined(BSD_VERSION) && \
(!defined(MODULE) || defined(__VMKERNEL_MODULE__)) && \
- !defined(__APPLE__) /* PR136775 */
+ !defined(__APPLE__) /* PR136775 */ || \
+ !defined(__NetBSD__)
#define ATOMIC_USE_FENCE
#endif
@@ -2046,4 +2047,4 @@ Atomic_MFence(void)
Atomic_Xor(&fence, 0x1);
}
-#endif // ifndef _ATOMIC_H_
+#endif // ifndef _VM_ATOMIC_H_

View File

@@ -0,0 +1,50 @@
$NetBSD: patch-ax,v 1.5 2012/12/25 21:02:15 joerg Exp $
--- lib/include/vm_basic_types.h.orig 2008-08-08 07:01:52.000000000 +0000
+++ lib/include/vm_basic_types.h
@@ -41,7 +41,7 @@
#include "includeCheck.h"
/* STRICT ANSI means the Xserver build and X defines Bool differently. */
-#if !defined(__STRICT_ANSI__) || defined(__FreeBSD__)
+#if !defined(__STRICT_ANSI__) || defined(__FreeBSD__) || defined(__NetBSD__)
typedef char Bool;
#endif
@@ -151,7 +151,7 @@ typedef char int8;
#endif
#if !defined(USING_AUTOCONF)
-# if defined(__FreeBSD__) || defined(sun)
+# if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__)
# ifdef KLD_MODULE
# include <sys/types.h>
# else
@@ -244,7 +244,7 @@ typedef int64 VmTimeVirtualClock; /* Vi
#define FMTSZ ""
#define FMTPD ""
#endif
- #elif defined(__linux__) \
+ #elif defined(__linux__) || defined(__NetBSD__) \
|| (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
|| (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
|| (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L)
@@ -267,7 +267,7 @@ typedef int64 VmTimeVirtualClock; /* Vi
#endif
#ifdef VM_X86_64
#define FMT64 "l"
- #elif defined(sun) || defined(__APPLE__) || defined(__FreeBSD__)
+ #elif defined(sun) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
#define FMT64 "ll"
#else
#define FMT64 "L"
@@ -717,7 +717,8 @@ typedef void * UserVA;
* 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

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ay,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/vm_product.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/vm_product.h
@@ -498,6 +498,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"
#elif defined(__APPLE__)

View File

@@ -0,0 +1,38 @@
$NetBSD: patch-az,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/include/vmblock.h.orig 2008-08-08 02:01:52.000000000 -0500
+++ lib/include/vmblock.h
@@ -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"
@@ -54,7 +55,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
@@ -71,7 +72,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

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-ba,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/misc/codesetOld.c.orig 2008-08-08 02:01:54.000000000 -0500
+++ lib/misc/codesetOld.c
@@ -70,7 +70,7 @@
#endif
-#if defined(__FreeBSD__) || defined(sun)
+#if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__)
static const char nul[] = {'\0', '\0'};
#else
static const wchar_t nul = L'\0';
@@ -735,7 +735,7 @@ CodeSetOldGetCodeSetFromLocale(void)
codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new));
freelocale(new);
-#elif defined(sun)
+#elif defined(sun) || defined(__NetBSD__)
char *locale = setlocale(LC_CTYPE, NULL);
if (!setlocale(LC_CTYPE, "")) {

View File

@@ -0,0 +1,62 @@
$NetBSD: patch-bb,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/misc/idLinux.c.orig 2008-08-08 02:01:54.000000000 -0500
+++ lib/misc/idLinux.c
@@ -99,7 +99,7 @@ static AuthorizationRef IdAuthCreateWith
#endif
-#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
/*
*----------------------------------------------------------------------------
*
@@ -163,6 +163,9 @@ Id_SetGid(gid_t egid) // IN: new egid
#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);
@@ -207,6 +210,9 @@ Id_SetRESUid(uid_t uid, // IN: new uid
#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);
@@ -249,6 +255,9 @@ Id_SetRESGid(gid_t gid, // IN: new gid
#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);
@@ -295,6 +304,9 @@ Id_SetREUid(uid_t uid, // IN: new uid
#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);
@@ -308,7 +320,7 @@ Id_SetREUid(uid_t uid, // IN: new uid
}
-#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
/*
*----------------------------------------------------------------------------
*

View File

@@ -0,0 +1,89 @@
$NetBSD: patch-bc,v 1.2 2008/08/31 06:36:48 scottr Exp $
--- lib/misc/posixPosix.c.orig 2008-08-08 02:01:54.000000000 -0500
+++ lib/misc/posixPosix.c
@@ -50,7 +50,7 @@
#include <sys/param.h>
#include <sys/mount.h>
#include <CoreFoundation/CoreFoundation.h>
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/param.h>
#include <sys/mount.h>
#elif !defined(N_PLAT_NLM)
@@ -77,6 +77,7 @@
# endif
#include "vmware.h"
+#include "vm_atomic.h"
#include "posixInt.h"
#if defined(sun)
#include "hashTable.h" // For setenv emulation
@@ -1578,7 +1579,7 @@ GetpwInternal(struct passwd *pw) // IN:
spw.pw_gecos = NULL;
free(spw.pw_shell);
spw.pw_shell = NULL;
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
free(spw.pw_class);
spw.pw_class = NULL;
#endif
@@ -1586,10 +1587,12 @@ GetpwInternal(struct passwd *pw) // IN:
/* Fill out structure with new values. */
spw.pw_uid = pw->pw_uid;
spw.pw_gid = pw->pw_gid;
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
spw.pw_change = pw->pw_change;
spw.pw_expire = pw->pw_expire;
+# if defined(__FreeBSD__)
spw.pw_fields = pw->pw_fields;
+# endif
#endif
#if !defined(sun)
@@ -1617,7 +1620,7 @@ GetpwInternal(struct passwd *pw) // IN:
(spw.pw_shell = Unicode_Alloc(pw->pw_shell, STRING_ENCODING_DEFAULT)) == NULL) {
goto exit;
}
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
if (pw->pw_class &&
(spw.pw_class = Unicode_Alloc(pw->pw_class, STRING_ENCODING_DEFAULT)) == NULL) {
goto exit;
@@ -1634,7 +1637,7 @@ exit:
}
-#if !defined(sun) // {
+#if !defined(sun) && !defined(__NetBSD__) // {
/*
*----------------------------------------------------------------------
@@ -1902,7 +1905,7 @@ PasswdCopy(struct passwd *orig, // IN
if (!CopyFieldIntoBuf(orig->pw_shell, &new->pw_shell, &buf, &bufLen)) {
return NULL;
}
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
if (!CopyFieldIntoBuf(orig->pw_class, &new->pw_class, &buf, &bufLen)) {
return NULL;
}
@@ -2647,7 +2650,7 @@ Posix_Getgrnam_r(ConstUnicode name, /
#if !defined(sun) // {
-#if !defined(__APPLE__) && !defined(__FreeBSD__) // {
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) // {
/*
*----------------------------------------------------------------------
*
@@ -3030,7 +3033,7 @@ Posix_Fprintf(FILE *stream,
}
-#endif // } !defined(__APPLE__) && !defined(__FreeBSD)
+#endif // } !defined(__APPLE__) && !defined(__FreeBSD) && !defined(__NetBSD__)
#else // } !defined(sun) {

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-bd,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/misc/util_misc.c.orig 2008-08-08 02:01:54.000000000 -0500
+++ lib/misc/util_misc.c
@@ -47,7 +47,7 @@
# include <pwd.h>
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <pthread.h>
#endif
@@ -481,7 +481,7 @@ Util_GetCurrentThreadId(void)
tid = getpid();
ASSERT(tid != (pid_t)-1);
return tid;
-#elif defined(__APPLE__) || defined(__FreeBSD__)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
ASSERT_ON_COMPILE(sizeof(Util_ThreadID) == sizeof(pthread_t));
return pthread_self();
#elif defined(_WIN32)

View File

@@ -0,0 +1,40 @@
$NetBSD: patch-be,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/netUtil/netUtilLinux.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/netUtil/netUtilLinux.c
@@ -31,7 +31,7 @@
#endif
-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
# error This file should not be compiled
#endif
@@ -58,7 +58,7 @@
#include <net/if.h>
#include <sys/ioctl.h>
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
#include "ifaddrs.h"
#endif
@@ -94,7 +94,7 @@
*----------------------------------------------------------------------
*/
-#if !defined(__FreeBSD__) && !defined(__APPLE__) /* { */
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__NetBSD__) /* { */
char *
NetUtil_GetPrimaryIP(void)
{
@@ -168,7 +168,7 @@ error:
return NULL;
}
-#else /* } FreeBSD || APPLE { */
+#else /* } FreeBSD || APPLE || NetBSD { */
char *
NetUtil_GetPrimaryIP(void)

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-bf,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/procMgr/procMgrPosix.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/procMgr/procMgrPosix.c
@@ -31,7 +31,7 @@
// pull in setresuid()/setresgid() if possible
#define _GNU_SOURCE
#include <unistd.h>
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
#include <asm/param.h>
#include <locale.h>
#include <sys/stat.h>
@@ -158,7 +158,7 @@ ProcMgr_ProcList *
ProcMgr_ListProcesses(void)
{
ProcMgr_ProcList *procList = NULL;
-#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
Bool failed = FALSE;
DynBuf dbProcId;
DynBuf dbProcCmd;
@@ -453,7 +453,7 @@ abort:
ProcMgr_FreeProcList(procList);
procList = NULL;
}
-#endif // !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#endif // !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
return procList;
}

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-bg,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/string/str.c.orig 2008-08-08 02:01:55.000000000 -0500
+++ lib/string/str.c
@@ -37,6 +37,10 @@
#endif
#include "codeset.h"
+#ifdef __NetBSD__
+#include <wchar.h>
+#endif
+
#if defined _WIN32 && !defined HAS_BSD_PRINTF
#define vsnprintf _vsnprintf
#endif
@@ -604,7 +608,7 @@ Str_SafeVasprintf(size_t *length,
return StrVasprintf_Internal(length, format, arguments, TRUE);
}
-#if defined(_WIN32) || defined(GLIBC_VERSION_22)
+#if defined(_WIN32) || (defined(GLIBC_VERSION_22) && !defined(__NetBSD__))
/*
*----------------------------------------------------------------------

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-bh,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/system/systemLinux.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/system/systemLinux.c
@@ -26,7 +26,7 @@
*
*/
-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) && !defined(__NetBSD__)
# error This file should not be compiled
#endif
@@ -55,7 +55,7 @@
#include <net/if.h>
#include <sys/ioctl.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "ifaddrs.h"
#endif
@@ -352,7 +352,7 @@ System_Shutdown(Bool reboot) // IN: "re
if (reboot) {
cmd = "shutdown -r now";
} else {
-#if __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
cmd = "shutdown -p now";
#else
cmd = "shutdown -h now";

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bi,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/unicode/unicodeSimpleTypes.c.orig 2008-08-08 02:01:55.000000000 -0500
+++ lib/unicode/unicodeSimpleTypes.c
@@ -2198,7 +2198,7 @@ UnicodeNormalizeEncodingName(const char
for (currentResult = result; *encodingName != '\0'; encodingName++) {
if (isalnum((int) *encodingName)) {
- *currentResult = tolower(*encodingName);
+ *currentResult = tolower((int)(*encodingName));
currentResult++;
}
}

View File

@@ -0,0 +1,38 @@
$NetBSD: patch-bj,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/user/hostinfoPosix.c.orig 2008-08-08 02:01:55.000000000 -0500
+++ lib/user/hostinfoPosix.c
@@ -894,8 +894,8 @@ HostinfoGetCpuInfo(int nCpu, //
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 */
@@ -1224,7 +1224,9 @@ Hostinfo_ResetProcessState(const int *ke
{
int s, fd;
struct sigaction sa;
+#ifdef RLIMIT_AS
struct rlimit rlim;
+#endif
#ifdef __linux__
int err;
uid_t euid;
@@ -1260,10 +1262,12 @@ Hostinfo_ResetProcessState(const int *ke
}
}
+#ifdef RLIMIT_AS
if (getrlimit(RLIMIT_AS, &rlim) == 0) {
rlim.rlim_cur = rlim.rlim_max;
setrlimit(RLIMIT_AS, &rlim);
}
+#endif
#ifdef __linux__
/*

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-bk,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/user/utilPosix.c.orig 2008-08-08 02:01:55.000000000 -0500
+++ lib/user/utilPosix.c
@@ -35,7 +35,7 @@
#include <errno.h>
#include <dirent.h>
-#if !__FreeBSD__ && !sun
+#if !__FreeBSD__ && !sun && !__NetBSD__
# include <pwd.h>
#endif
@@ -85,7 +85,7 @@
-#if !__FreeBSD__ && !sun
+#if !__FreeBSD__ && !sun && !__NetBSD__
/*
*-----------------------------------------------------------------------------
@@ -624,7 +624,7 @@ Util_GetSafeTmpDir(Bool useConf) // IN
#endif // __linux__
-#if defined(__linux__) || defined(__FreeBSD__) || defined(sun)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__)
/*
*----------------------------------------------------------------------------
*

View File

@@ -0,0 +1,67 @@
$NetBSD: patch-bl,v 1.1 2008/08/31 06:36:48 scottr Exp $
--- lib/vixTools/vixTools.c.orig 2008-08-08 02:01:53.000000000 -0500
+++ lib/vixTools/vixTools.c
@@ -74,7 +74,7 @@
#endif
/* Only Windows and Linux use impersonation functions. */
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
#include "impersonate.h"
#endif
@@ -702,7 +702,7 @@ VixTools_GetToolsPropertiesImpl(GuestApp
VixPropertyListImpl propList;
char *serializedBuffer = NULL;
size_t serializedBufferLength = 0;
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
char guestName[512];
int osFamily;
char *packageList = NULL;
@@ -937,7 +937,7 @@ VixToolsSetProperties(VixCommandRequestH
GuestApp_Dict **confDictRef) // IN
{
VixError err = VIX_OK;
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
size_t serialBufferLength;
char *serialBuffer = NULL;
VixPropertyListImpl propList;
@@ -1734,7 +1734,7 @@ VixToolsMoveFile(VixCommandRequestHeader
* Be careful. Renaming a file to itself can cause it to be deleted.
* This should be a no-op anyway.
*/
-#if !defined(sun) && !defined(__FreeBSD__)
+#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__)
if (File_IsSameFile(srcFilePathName, destFilePathName)) {
err = VIX_OK;
goto abort;
@@ -2716,7 +2716,7 @@ VixToolsImpersonateUserImplEx(char const
}
///////////////////////////////////////////////////////////////////////
-#if defined(__FreeBSD__) || defined(sun)
+#if defined(__FreeBSD__) || defined(sun) || defined(__NetBSD__)
err = VIX_E_NOT_SUPPORTED;
///////////////////////////////////////////////////////////////////////
#elif defined(_WIN32) || defined(linux)
@@ -2913,7 +2913,7 @@ VixToolsLogoutUser(void *userToken) /
return;
}
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
if (NULL != userToken) {
AuthToken authToken = (AuthToken) userToken;
Auth_CloseToken(authToken);
@@ -3105,7 +3105,7 @@ VixToolsProcessHgfsPacket(VixCommandHgfs
hgfsPacket = ((char *) requestMsg) + sizeof(*requestMsg);
hgfsPacketSize = requestMsg->hgfsPacketSize;
-#if !defined(N_PLAT_NLM) && !defined(__FreeBSD__)
+#if !defined(N_PLAT_NLM) && !defined(__FreeBSD__) && !defined(__NetBSD__)
/*
* Impersonation was okay, so let's give our packet to
* the HGFS server and forward the reply packet back.

View File

@@ -0,0 +1,72 @@
$NetBSD: patch-bm,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- lib/wiper/wiperPosix.c.orig 2008-08-08 02:01:55.000000000 -0500
+++ lib/wiper/wiperPosix.c
@@ -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 __FreeBSD_version >= 500000
+# if defined(__FreeBSD__) && __FreeBSD_version >= 500000
# include <libgen.h>
# endif /* __FreeBSD_version < 500000 */
#endif
@@ -66,7 +66,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
@@ -196,7 +196,7 @@ WiperIsDiskDevice(MNTINFO *mnt,
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
@@ -210,7 +210,7 @@ WiperIsDiskDevice(MNTINFO *mnt,
* function, as a whole, does not even apply to OS X, so this caveat is
* only minor.
*/
-#if __FreeBSD_version < 500000
+#if defined(__NetBSD__) || __FreeBSD_version < 500000
/*
* Before FreeBSD 5, device nodes had static major/minor numbers.
* (FreeBSD 5 included devfs which got rid of this concept.) So
@@ -511,14 +511,14 @@ WiperSinglePartition_GetSpace(const Wipe
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 (Posix_Statfs(p->mountPoint, &statfsbuf) < 0) {

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-bn,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- scripts/netbsd/poweroff-vm-default.orig 2008-08-19 17:54:40.000000000 -0500
+++ scripts/netbsd/poweroff-vm-default
@@ -0,0 +1,32 @@
+#!/bin/sh
+##########################################################
+# Copyright (C) 2004-2008 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+##########################################################################
+# DO NOT modify this file directly as it will be overwritten the next
+# time the VMware Tools are installed.
+##########################################################################
+
+echo `date` ": Executing '$0'"
+
+scriptsdir="`dirname $0`/scripts/`basename $0`.d"
+if [ -d "$scriptsdir" ]; then
+ for scriptfile in "$scriptsdir"/*; do
+ [ -x "$scriptfile" ] && "$scriptfile" poweroff-vm
+ done
+fi

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-bo,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- scripts/netbsd/poweron-vm-default.orig 2008-08-19 17:54:40.000000000 -0500
+++ scripts/netbsd/poweron-vm-default
@@ -0,0 +1,32 @@
+#!/bin/sh
+##########################################################
+# Copyright (C) 2004-2008 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+##########################################################################
+# DO NOT modify this file directly as it will be overwritten the next
+# time the VMware Tools are installed.
+##########################################################################
+
+echo `date` ": Executing '$0'"
+
+scriptsdir="`dirname $0`/scripts/`basename $0`.d"
+if [ -d "$scriptsdir" ]; then
+ for scriptfile in "$scriptsdir"/*; do
+ [ -x "$scriptfile" ] && "$scriptfile" poweron-vm
+ done
+fi

View File

@@ -0,0 +1,40 @@
$NetBSD: patch-bp,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- scripts/netbsd/resume-vm-default.orig 2008-08-19 17:54:40.000000000 -0500
+++ scripts/netbsd/resume-vm-default
@@ -0,0 +1,35 @@
+#!/bin/sh
+##########################################################
+# Copyright (C) 2004-2008 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+##########################################################################
+# DO NOT modify this file directly as it will be overwritten the next
+# time the VMware Tools are installed.
+##########################################################################
+
+echo `date` ": Executing '$0'"
+
+scriptsdir="`dirname $0`/scripts/`basename $0`.d"
+if [ -d "$scriptsdir" ]; then
+ for scriptfile in "$scriptsdir"/*; do
+ [ -x "$scriptfile" ] && "$scriptfile" resume-vm
+ done
+fi
+
+# Start the network.
+/etc/rc.d/dhclient start

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-bq,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- scripts/netbsd/suspend-vm-default.orig 2008-08-19 17:54:40.000000000 -0500
+++ scripts/netbsd/suspend-vm-default
@@ -0,0 +1,37 @@
+#!/bin/sh
+##########################################################
+# Copyright (C) 2004-2008 VMware, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation version 2.1 and no later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+##########################################################
+
+##########################################################################
+# DO NOT modify this file directly as it will be overwritten the next
+# time the VMware Tools are installed.
+##########################################################################
+
+echo `date` ": Executing '$0'"
+
+scriptsdir="`dirname $0`/scripts/`basename $0`.d"
+if [ -d "$scriptsdir" ]; then
+ for scriptfile in "$scriptsdir"/*; do
+ [ -x "$scriptfile" ] && "$scriptfile" suspend-vm
+ done
+fi
+
+ps auxw | grep -q dhclient
+if [ "$?" -eq 0 ]; then
+ dhclient -r
+fi

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-br,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- toolbox/toolbox-cmd.c.orig 2008-08-08 02:01:57.000000000 -0500
+++ toolbox/toolbox-cmd.c
@@ -43,7 +43,10 @@ typedef void (*ToolboxHelpFunc)(char *pr
* Local Data
*/
-const typedef struct CmdTable {
+#if !defined(__NetBSD__) || __NetBSD_Version__ >= 400000000 // Work around gcc? const-const issue
+const
+#endif
+typedef struct CmdTable {
const char *command; /* The name of the command. */
ToolboxCmdFunc func; /* The function to execute. */
Bool requireRoot; /* Indicates whether root is required. */

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bs,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- vmware-user-suid-wrapper/locationsdb.c.orig 2008-08-08 02:01:56.000000000 -0500
+++ vmware-user-suid-wrapper/locationsdb.c
@@ -26,7 +26,7 @@
* link against lib/unixinstall.
*/
-#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux)
+#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux) && !defined(__NetBSD__)
# error This program is not supported on your platform.
#endif

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bt,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- vmware-user-suid-wrapper/main.c.orig 2008-08-08 02:01:56.000000000 -0500
+++ vmware-user-suid-wrapper/main.c
@@ -28,7 +28,7 @@
* remove blocks in the blocking file system.
*/
-#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux)
+#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux) && !defined(__NetBSD__)
# error This program is not supported on your platform.
#endif

View File

@@ -0,0 +1,145 @@
$NetBSD: patch-bu,v 1.1 2008/08/31 06:36:49 scottr Exp $
--- vmware-user-suid-wrapper/wrapper-netbsd.c.orig 2008-08-19 17:54:40.000000000 -0500
+++ vmware-user-suid-wrapper/wrapper-netbsd.c
@@ -0,0 +1,140 @@
+/*********************************************************
+ * Copyright (C) 2007 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * wrapper.c --
+ *
+ * Platform specific code for the VMware User Agent setuid wrapper.
+ */
+
+
+#include <sys/param.h>
+#include <sys/mount.h>
+// #include <sys/uio.h> // for nmount(2)
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "vmware.h"
+#include "wrapper.h"
+
+
+/*
+ * Global functions
+ */
+
+
+#ifdef USES_LOCATIONS_DB
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * BuildExecPath --
+ *
+ * Determine & return path of vmware-user for use by execve(2).
+ *
+ * Results:
+ * TRUE on success, FALSE otherwise
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+BuildExecPath(char *execPath, // OUT: Buffer to store executable's path
+ size_t execPathSize) // IN : size of execPath buffer
+{
+ char tmpPath[MAXPATHLEN];
+ int execLen;
+
+ /*
+ * The locations database is the only path that's fixed, and it contains the
+ * paths to all the other paths selected during Tools configuration. The
+ * locations database file is only writable by root, so we can trust it.
+ */
+ if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_BINDIR, tmpPath, sizeof tmpPath)) {
+ Error("could not obtain BINDIR\n");
+ return FALSE;
+ }
+
+ if (strlcat(tmpPath,
+ "/vmware-user-wrapper", sizeof tmpPath) >= sizeof tmpPath) {
+ Error("could not construct program filename\n");
+ return FALSE;
+ }
+
+ /*
+ * From readlink(2), "The readlink() system call does not append a NUL
+ * character to buf." (NB: This breaks if user ever replaces the symlink
+ * with the target.)
+ */
+ if ((execLen = readlink(tmpPath, execPath, execPathSize - 1)) == -1) {
+ Error("could not resolve symlink: %s\n", strerror(errno));
+ return FALSE;
+ }
+
+ execPath[execLen] = '\0';
+
+ /*
+ * Now make sure that the target is actually part of our "trusted"
+ * directory. (Check that execPath has LIBDIR as a prefix and does
+ * not contain "..".)
+ */
+ if (!QueryLocationsDB(LOCATIONS_PATH, QUERY_LIBDIR, tmpPath,
+ sizeof tmpPath)) {
+ Error("could not obtain LIBDIR\n");
+ return FALSE;
+ }
+
+ if ((strncmp(execPath, tmpPath, strlen(tmpPath)) != 0) ||
+ (strstr(execPath, "..") != NULL)) {
+ Error("vmware-user path untrusted\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+#endif // ifdef USES_LOCATIONS_DB
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * CompatExec --
+ *
+ * Simple platform-dependent execve() wrapper.
+ *
+ * Results:
+ * False.
+ *
+ * Side effects:
+ * This function may not return.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+CompatExec(const char *path, char * const argv[], char * const envp[])
+{
+ execve(path, argv, envp);
+ return FALSE;
+}

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-bv,v 1.2 2012/12/25 21:02:15 joerg Exp $
--- vmware-user/foreignVMToolsDaemon.c.orig 2008-08-08 07:01:56.000000000 +0000
+++ vmware-user/foreignVMToolsDaemon.c
@@ -55,7 +55,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <fcntl.h>
-#if defined(__FreeBSD__) || defined(sun) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(sun) || defined(__APPLE__) || defined(__NetBSD__)
#include <unistd.h>
#else
#include <linux/unistd.h>
@@ -833,8 +833,7 @@ ForeignToolsSetProperties(ForeignVMTools
* Do some validation
*/
if ((NULL == asyncCommand)
- || (NULL == requestMsg)
- || (0 > requestMsg->bufferSize)) {
+ || (NULL == requestMsg)) {
err = VIX_E_INVALID_ARG;
goto abort;
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-bw,v 1.2 2012/12/25 21:02:15 joerg Exp $
--- vmware-user/foreignVMToolsDaemon.h.orig 2008-08-08 07:01:56.000000000 +0000
+++ vmware-user/foreignVMToolsDaemon.h
@@ -59,7 +59,7 @@ VixError VIX_INIT_LOCK(VixLockType *lock
#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
@@ -72,7 +72,7 @@ VixError VIX_INIT_LOCK(VixLockType *lock
typedef pthread_mutex_t VixLockType;
static INLINE VixError VIX_INIT_LOCK(VixLockType *lockPtr);
-VixError VIX_INIT_LOCK(VixLockType *lockPtr)
+static INLINE VixError VIX_INIT_LOCK(VixLockType *lockPtr)
{
int result;
pthread_mutexattr_t attr;

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-bx,v 1.2 2012/12/25 21:02:15 joerg Exp $
--- xferlogs/xferlogs.c.orig 2008-08-08 07:01:57.000000000 +0000
+++ xferlogs/xferlogs.c
@@ -125,7 +125,7 @@ xmitFile(char *filename) //IN : file to
RpcVMX_Log("%s: %s: ver - %d", LOG_START_MARK, filename, LOG_VERSION);
while ((readLen = fread(buf, 1, sizeof buf, fp)) > 0 ) {
if (Base64_Encode(buf, readLen, base64Buf, sizeof base64B - 1, NULL)) {
- RpcVMX_Log(base64B);
+ RpcVMX_Log("%s", base64B);
} else {
Warning("Error in Base64_Encode\n");
goto exit;
@@ -200,8 +200,8 @@ extractFile(char *filename) //IN: vmx lo
* Ignore the filename in the log, for obvious security reasons
* and create a new filename consiting of time and enumerator.
*/
- Str_Sprintf(fname, sizeof fname, "%d_%"FMTTIME".log",
- filenu++, time(NULL));
+ Str_Sprintf(fname, sizeof fname, "%d_%lld.log",
+ filenu++, (long long)time(NULL));
/*
* Read the version information, if they dont match just warn
@@ -261,7 +261,7 @@ main(int argc, char *argv[])
usage();
return -1;
} if (argc == 2) {
- RpcVMX_Log(argv[1]);
+ RpcVMX_Log("%s", argv[1]);
return 0;
}

View File

@@ -0,0 +1,60 @@
$NetBSD: patch-by,v 1.1 2009/09/22 07:08:05 taca Exp $
--- lib/hgfs/hgfsUtil.c.orig 2008-08-08 16:01:54.000000000 +0900
+++ lib/hgfs/hgfsUtil.c
@@ -95,24 +95,19 @@ int
HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
uint64 ntTime) // IN: Time in Windows NT format
{
-#ifndef VM_X86_64
uint32 sec;
uint32 nsec;
ASSERT(unixTime);
- /* We assume that time_t is 32bit */
- ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4);
- /* Cap NT time values that are outside of Unix time's range */
-
- if (ntTime >= UNIX_S32_MAX) {
- unixTime->tv_sec = 0x7FFFFFFF;
- unixTime->tv_nsec = 0;
- return 1;
- }
-#else
- ASSERT(unixTime);
-#endif
+ if (sizeof(unixTime->tv_sec) == 4) {
+ /* Cap NT time values that are outside of Unix time's range */
+ if (ntTime >= UNIX_S32_MAX) {
+ unixTime->tv_sec = 0x7FFFFFFF;
+ unixTime->tv_nsec = 0;
+ return 1;
+ }
+ }
if (ntTime < UNIX_EPOCH) {
unixTime->tv_sec = 0;
@@ -120,14 +115,14 @@ HgfsConvertFromNtTimeNsec(struct timespe
return -1;
}
-#ifndef VM_X86_64
- Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
- unixTime->tv_sec = sec;
- unixTime->tv_nsec = nsec * 100;
-#else
- unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
- unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
-#endif
+ if (sizeof(unixTime->tv_sec) == 4) {
+ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
+ unixTime->tv_sec = sec;
+ unixTime->tv_nsec = nsec * 100;
+ } else {
+ unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
+ unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
+ }
return 0;
}

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-checkvm_checkvm.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- checkvm/checkvm.c.orig 2012-12-25 19:48:10.000000000 +0000
+++ checkvm/checkvm.c
@@ -77,7 +77,7 @@ getVersion(uint32 *version)
{
uint32 eax, ebx, ecx, edx;
- __asm__ volatile("inl (%%dx)" :
+ __asm__ volatile("inl %%dx, %%eax" :
"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
"0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION),
"2"(BDOOR_PORT) : "memory");
@@ -94,7 +94,7 @@ getHWVersion(uint32 *hwVersion)
{
uint32 eax, ebx, ecx, edx;
- __asm__ volatile("inl (%%dx)" :
+ __asm__ volatile("inl %%dx, %%eax" :
"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
"0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION),
"2"(BDOOR_PORT) : "memory");
@@ -110,7 +110,7 @@ getScreenSize(uint32 *screensize)
{
uint32 eax, ebx, ecx, edx;
- __asm__ volatile("inl (%%dx)" :
+ __asm__ volatile("inl %%dx, %%eax" :
"=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
"0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE),
"2"(BDOOR_PORT) : "memory");

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-configure.ac,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- configure.ac.orig 2008-08-08 07:01:58.000000000 +0000
+++ configure.ac
@@ -111,6 +111,9 @@ case "$host_os" in
[linux*])
os="linux"
;;
+ [netbsd*])
+ os="netbsd"
+ ;;
[freebsd*])
os="freebsd"
;;
@@ -573,7 +576,7 @@ if test "$with_dnet" = "yes"; then
GUESTD_LDADD="$GUESTD_LDADD $DNET_LIBS"
VMWARE_USER_LDADD="$VMWARE_USER_LDADD $DNET_LIBS"
- if test "$DNET_CONFIG" == dumbnet-config; then
+ if test "$DNET_CONFIG" = dumbnet-config; then
AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting Debian's libdumbnet for libdnet.])
fi
else

View File

@@ -0,0 +1,39 @@
$NetBSD: patch-guestd_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- guestd/Makefile.am.orig 2008-08-08 07:01:56.000000000 +0000
+++ guestd/Makefile.am
@@ -50,8 +50,8 @@ vmware_guestd_LDADD += ../lib/system/lib
vmware_guestd_LDADD += ../lib/user/libUser.a
vmware_guestd_LDADD += ../lib/vixTools/libVixTools.a
vmware_guestd_LDADD += ../lib/vmBackupLib/libVmBackupLib.a
-vmware_guestd_LDADD += ../lib/vmCheck/libVmCheck.a
-vmware_guestd_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_guestd_LDADD += ../lib/vmCheck/libVmCheck.la
+vmware_guestd_LDADD += ../lib/vmSignal/libVmSignal.la
vmware_guestd_LDADD += ../lib/wiper/libWiper.a
# In the absence of the linker options --start-group and --end-group (which
# can't be put in LDADD), we need to bring the following libraries out of the
@@ -92,19 +92,11 @@ else
vmware_guestd_LINK = $(LINK)
endif
-if LINUX
-if PAMD
-if THIRTY_TWO_BIT_USERSPACE
-pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd
-else
-pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd-x64
-endif !THIRTY_TWO_BIT_USERSPACE
-endif PAMD
-endif LINUX
+EGDIR = @datarootdir@/examples
install-exec-hook:
- $(INSTALL) -d $(DESTDIR)/etc/vmware-tools
- echo 'disable-tools-version = "true"' > $(DESTDIR)/etc/vmware-tools/tools.conf
+ $(INSTALL) -d $(DESTDIR)${EGDIR}/vmware-tools
+ echo 'disable-tools-version = "true"' > $(DESTDIR)${EGDIR}/vmware-tools/tools.conf
uninstall-hook:
- $(RM) -rf $(DESTDIR)/etc/vmware-tools
+ $(RM) -rf $(DESTDIR)${EGDIR}/vmware-tools

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-hgfsclient_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- hgfsclient/Makefile.am.orig 2008-08-08 07:01:57.000000000 +0000
+++ hgfsclient/Makefile.am
@@ -25,8 +25,8 @@ vmware_hgfsclient_LDADD += ../lib/hgfsBd
vmware_hgfsclient_LDADD += ../lib/rpcOut/libRpcOut.a
vmware_hgfsclient_LDADD += ../lib/string/libString.a
vmware_hgfsclient_LDADD += ../lib/toolsLogger/libToolsLogger.a
-vmware_hgfsclient_LDADD += ../lib/vmCheck/libVmCheck.a
-vmware_hgfsclient_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_hgfsclient_LDADD += ../lib/vmCheck/libVmCheck.la
+vmware_hgfsclient_LDADD += ../lib/vmSignal/libVmSignal.la
# In the absence of the linker options --start-group and --end-group (which can't
# be put in LDADD), we need to bring the following libraries out of the alphebetical
# order so their symbols are properly resolved.

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-lib_hgfsServer_hgfsServer.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- lib/hgfsServer/hgfsServer.c.orig 2012-12-25 19:41:00.000000000 +0000
+++ lib/hgfsServer/hgfsServer.c
@@ -2441,7 +2441,7 @@ HgfsServerStatFs(const char *pathName, /
* delimiter on copy. Allow 0 length drives so that hidden feature "" can
* work.
*/
- if (pathLength < 0 || pathLength >= sizeof p.mountPoint) {
+ if (pathLength >= sizeof p.mountPoint) {
LOG(4, ("HgfsServerStatFs: could not get the volume name\n"));
return FALSE;
}
@@ -3305,10 +3305,6 @@ HgfsCreateAndCacheFileNode(HgfsFileOpenI
* for the share name, should be none.
*/
len = CPName_GetComponentGeneric(openInfo->cpName, inEnd, "", &next);
- if (len < 0) {
- LOG(4, ("HgfsServerGetAccess: get first component failed\n"));
- return FALSE;
- }
/* See if we are dealing with the base of the namespace */
if (!len) {

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_hgfsServer_hgfsServerLinux.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- lib/hgfsServer/hgfsServerLinux.c.orig 2012-12-25 19:41:43.000000000 +0000
+++ lib/hgfsServer/hgfsServerLinux.c
@@ -544,7 +544,7 @@ HgfsServerGetOpenFlags(HgfsOpenFlags fla
arraySize = ARRAYSIZE(HgfsServerOpenFlags);
- if (flagsIn < 0 || flagsIn >= arraySize) {
+ if (flagsIn >= arraySize) {
Log("HgfsServerGetOpenFlags: Invalid HgfsOpenFlags %d\n", flagsIn);
return FALSE;
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-lib_panic_panic.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- lib/panic/panic.c.orig 2012-12-25 19:42:53.000000000 +0000
+++ lib/panic/panic.c
@@ -497,7 +497,7 @@ Panic_Panic(const char *format,
case 0:
break;
case 1:
- Log(buf);
+ Log("%s", buf);
Log("Panic loop\n");
default:
fprintf(stderr, "Panic loop\n");
@@ -510,7 +510,7 @@ Panic_Panic(const char *format,
* the log file on exit.
*/
- Log(buf);
+ Log("%s", buf);
Util_Backtrace(0);
Log_SetAlwaysKeep(TRUE);

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-lib_vmCheck_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- lib/vmCheck/Makefile.am.orig 2008-08-08 07:01:50.000000000 +0000
+++ lib/vmCheck/Makefile.am
@@ -15,7 +15,6 @@
### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
################################################################################
-noinst_LIBRARIES = libVmCheck.a
+noinst_LTLIBRARIES = libVmCheck.la
-libVmCheck_a_SOURCES =
-libVmCheck_a_SOURCES += vmcheck.c
+libVmCheck_la_SOURCES = vmcheck.c

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_vmSignal_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- lib/vmSignal/Makefile.am.orig 2013-03-31 21:45:43.000000000 +0000
+++ lib/vmSignal/Makefile.am
@@ -15,7 +15,7 @@
### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
################################################################################
-noinst_LIBRARIES = libVmSignal.a
+noinst_LTLIBRARIES = libVmSignal.la
-libVmSignal_a_SOURCES =
-libVmSignal_a_SOURCES += vmsignal.c
+libVmSignal_la_SOURCES =
+libVmSignal_la_SOURCES += vmsignal.c

View File

@@ -0,0 +1,20 @@
$NetBSD: patch-libguestlib_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- libguestlib/Makefile.am.orig 2008-08-08 07:01:57.000000000 +0000
+++ libguestlib/Makefile.am
@@ -26,12 +26,14 @@ libguestlib_la_LIBADD += ../lib/stubs/sh
# order so their symbols are properly resolved.
libguestlib_la_LIBADD += ../lib/message/shared/libMessage.la
libguestlib_la_LIBADD += ../lib/backdoor/shared/libBackdoor.la
+libguestlib_la_LIBADD += ../lib/vmCheck/libVmCheck.la
+libguestlib_la_LIBADD += ../lib/vmSignal/libVmSignal.la
libguestlib_la_SOURCES =
libguestlib_la_SOURCES += vmGuestLib.c
libguestlib_la_SOURCES += vmGuestLibPanic.c
-libguestlib_la_LDFLAGS =
+libguestlib_la_LDFLAGS = -no-undefined
# We require GCC, so we're fine passing compiler-specific flags.
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
libguestlib_la_LDFLAGS += -Wl,-lc

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-scripts_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- scripts/Makefile.am.orig 2008-08-08 07:01:58.000000000 +0000
+++ scripts/Makefile.am
@@ -1,7 +1,7 @@
-confdir = /etc/vmware-tools
+EGDIR = @datarootdir@/examples
+confdir = ${EGDIR}/vmware-tools
-conf_SCRIPTS = ./common/vm-support
-conf_SCRIPTS += $(MODULES_OS)/poweron-vm-default
+conf_SCRIPTS = $(MODULES_OS)/poweron-vm-default
conf_SCRIPTS += $(MODULES_OS)/poweroff-vm-default
conf_SCRIPTS += $(MODULES_OS)/suspend-vm-default
conf_SCRIPTS += $(MODULES_OS)/resume-vm-default

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-toolbox_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- toolbox/Makefile.am.orig 2008-08-08 07:01:57.000000000 +0000
+++ toolbox/Makefile.am
@@ -26,8 +26,8 @@ COMMON += ../lib/rpcOut/libRpcOut.a
COMMON += ../lib/string/libString.a
COMMON += ../lib/system/libSystem.a
COMMON += ../lib/user/libUser.a
-COMMON += ../lib/vmCheck/libVmCheck.a
-COMMON += ../lib/vmSignal/libVmSignal.a
+COMMON += ../lib/vmCheck/libVmCheck.la
+COMMON += ../lib/vmSignal/libVmSignal.la
COMMON += ../lib/wiper/libWiper.a
# In the absence of the linker options --start-group and --end-group (which
# can't be put in LDADD), we need to bring the following libraries out of

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-toolbox_toolboxcmd-stat.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- toolbox/toolboxcmd-stat.c.orig 2012-12-25 19:51:17.000000000 +0000
+++ toolbox/toolboxcmd-stat.c
@@ -96,10 +96,6 @@ Stat_ProcessorSpeed(void)
bp.in.cx.halfs.low = BDOOR_CMD_GETMHZ;
Backdoor(&bp);
speed = bp.out.ax.word;
- if (speed < 0) {
- fprintf(stderr, "Unable to get processor speed\n");
- return EX_TEMPFAIL;
- }
printf("%u MHz\n", speed);
return EXIT_SUCCESS;
}
@@ -130,10 +126,6 @@ Stat_MemorySize(void)
bp.in.cx.halfs.low = BDOOR_CMD_GETMEMSIZE;
Backdoor(&bp);
memsize = bp.out.ax.word;
- if (memsize < 0) {
- fprintf(stderr, "Unable to get memory size\n");
- return EX_TEMPFAIL;
- }
printf("%u MB\n", memsize);
return EXIT_SUCCESS;
}
@@ -166,10 +158,6 @@ Stat_HostTime(void)
bp.in.cx.halfs.low = BDOOR_CMD_GETTIME;
Backdoor(&bp);
time = bp.out.ax.word;
- if (time < 0) {
- fprintf(stderr, "Unable to get host time\n");
- return EX_TEMPFAIL;
- }
sprintf(buf, "%u", time);
strptime(buf, "%s", &tm);
strftime(buf, sizeof(buf), "%d %b %Y %H:%M:%S", &tm);

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-vmware-user_Makefile.am,v 1.1 2013/04/01 12:25:17 joerg Exp $
--- vmware-user/Makefile.am.orig 2013-03-31 21:25:01.000000000 +0000
+++ vmware-user/Makefile.am
@@ -60,8 +60,8 @@ else
endif
vmware_user_LDADD += ../lib/user/libUser.a
vmware_user_LDADD += ../lib/vixTools/libVixTools.a
-vmware_user_LDADD += ../lib/vmCheck/libVmCheck.a
-vmware_user_LDADD += ../lib/vmSignal/libVmSignal.a
+vmware_user_LDADD += ../lib/vmCheck/libVmCheck.la
+vmware_user_LDADD += ../lib/vmSignal/libVmSignal.la
vmware_user_LDADD += ../lib/wiper/libWiper.a
# In the absence of the linker options --start-group and --end-group (which
# can't be put in LDADD), we need to bring the following libraries out of

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-vmware-user_copyPaste.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- vmware-user/copyPaste.c.orig 2012-12-25 19:45:44.000000000 +0000
+++ vmware-user/copyPaste.c
@@ -655,14 +655,6 @@ CopyPasteSelectionGetCB(GtkWidget
const size_t origTextLen = textLen;
Bool freeBegin = FALSE;
- if (len < 0) {
- Debug("CopyPasteSelectionGetCB: error getting next component\n");
- if (text) {
- free(text);
- }
- return;
- }
-
/*
* A URI list will expect the provided path to be escaped. If we cannot
* escape the path for some reason we just use the unescaped version and
@@ -1761,11 +1753,6 @@ CopyPasteRpcInGHGetNextFileCB(char const
cpNameSize = CPNameUtil_ConvertToRoot(fileName,
sizeof resultBuffer - (fileNameSize + 1),
resultBuffer + fileNameSize + 1);
- if (cpNameSize < 0) {
- Warning("CopyPasteRpcInGHGetNextFileCB: could not convert to CPName\n");
- return RpcIn_SetRetVals(result, resultLen,
- "error on CPName conversion", FALSE);
- }
/* Set manually because RpcIn_SetRetVals() assumes no NUL characters */
*result = resultBuffer;

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-vmware-user_dnd.c,v 1.1 2012/12/25 21:02:15 joerg Exp $
--- vmware-user/dnd.c.orig 2012-12-25 19:46:26.000000000 +0000
+++ vmware-user/dnd.c
@@ -943,12 +943,6 @@ DnDRpcInGetNextFileCB(char const **resul
cpNameSize = CPNameUtil_ConvertToRoot(fileName,
sizeof resultBuffer - (fileNameSize + 1),
resultBuffer + fileNameSize + 1);
- if (cpNameSize < 0) {
- Warning("DnDRpcInGetNextFileCB: could not convert to CPName\n");
- DnDGHCancel(mainWnd);
- return RpcIn_SetRetVals(result, resultLen,
- "error on CPName conversion", FALSE);
- }
/* Set manually because RpcIn_SetRetVals() assumes no NUL characters */
*result = resultBuffer;
@@ -1223,14 +1217,6 @@ DnDGtkDataRequestCB(GtkWidget *widget,
const size_t origTextLen = textLen;
Bool freeBegin = FALSE;
- if (len < 0) {
- Log("DnDGtkDataRequestCB: error getting next component\n");
- if (text) {
- free(text);
- }
- return;
- }
-
/*
* A URI list will expect the provided path to be escaped. If we cannot
* escape the path for some reason we just use the unescaped version and