8e053ee7cb
enhancements: - Simple command-line tools to interface with VMware host - Guest OS scripts that can be triggered by the VMware host - Startup script When compiled with X11 support (the default), this release also provides: - GTK+-based GUI to configure time sync, device connections, and scripts - Helper application to interface with the xf86-video-vmware driver, enabling dynamic screen resize
89 lines
2.6 KiB
Text
89 lines
2.6 KiB
Text
$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) {
|