pkgsrc/sysutils/open-vm-tools/patches/patch-ax
bjs 3e398b961b Instead of using PRId32 (which fixed the amd64 build only to break i386),
just use %lld and cast time() to (long long int) in xferlogs/xferlogs.c.
PKGREVISION++.
2008-09-14 16:15:05 +00:00

41 lines
1.4 KiB
Text

$NetBSD: patch-ax,v 1.4 2008/09/14 16:15:05 bjs Exp $
--- lib/include/vm_basic_types.h.orig 2008-08-08 03:01:52.000000000 -0400
+++ 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
@@ -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