Fixup fromcvs/togit conversion
[pkgsrcv2.git] / sysutils / open-vm-tools / patches / patch-bm
1 $NetBSD$
2
3 --- lib/wiper/wiperPosix.c.orig 2008-08-08 02:01:55.000000000 -0500
4 +++ lib/wiper/wiperPosix.c
5 @@ -23,7 +23,7 @@
6   *
7   */
8  
9 -#if !defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__APPLE__)
10 +#if !defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__NetBSD__)
11  #error This file should not be compiled on this platform.
12  #endif
13  
14 @@ -31,12 +31,12 @@
15  #include <sys/stat.h>
16  #if defined(__linux__) || defined(sun)
17  # include <sys/vfs.h>
18 -#elif defined(__FreeBSD__) || defined(__APPLE__)
19 +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
20  # include <sys/param.h>
21  # include <sys/ucred.h>
22  # include <sys/mount.h>
23  # include <fstab.h>
24 -# if __FreeBSD_version >= 500000
25 +# if defined(__FreeBSD__) && __FreeBSD_version >= 500000
26  #  include <libgen.h>
27  # endif /* __FreeBSD_version < 500000 */
28  #endif
29 @@ -66,7 +66,7 @@
30  
31  #if defined(sun) || defined(__linux__)
32  # define PROCFS "proc"
33 -#elif defined(__FreeBSD__) || defined(__APPLE__)
34 +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
35  # define PROCFS "procfs"
36  #endif
37  
38 @@ -196,7 +196,7 @@ WiperIsDiskDevice(MNTINFO *mnt,         
39     return TRUE;
40  }
41  
42 -#elif defined(__FreeBSD__) || defined(__APPLE__) /* } FreeBSD { */
43 +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) /* } FreeBSD { */
44  
45  static INLINE Bool
46  WiperIsDiskDevice(MNTINFO *mnt,         // IN: file system being considered
47 @@ -210,7 +210,7 @@ WiperIsDiskDevice(MNTINFO *mnt,         
48      * function, as a whole, does not even apply to OS X, so this caveat is
49      * only minor.
50      */
51 -#if __FreeBSD_version < 500000
52 +#if defined(__NetBSD__) || __FreeBSD_version < 500000
53     /*
54      * Before FreeBSD 5, device nodes had static major/minor numbers.
55      * (FreeBSD 5 included devfs which got rid of this concept.)  So
56 @@ -511,14 +511,14 @@ WiperSinglePartition_GetSpace(const Wipe
57                                uint64 *free,       // OUT
58                                uint64 *total)      // OUT
59  {
60 -#ifdef sun
61 +#if defined(sun) || defined(__NetBSD__)
62     struct statvfs statfsbuf;
63  #else
64     struct statfs statfsbuf;
65  #endif
66     ASSERT(p);
67  
68 -#ifdef sun
69 +#if defined(sun) || defined(__NetBSD__)
70     if (statvfs(p->mountPoint, &statfsbuf) < 0) {
71  #else
72     if (Posix_Statfs(p->mountPoint, &statfsbuf) < 0) {