summaryrefslogtreecommitdiff
path: root/devel/pwlib/patches/patch-ad
blob: 468f24d762bff15a8199df6b681b885169cbe03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-ad,v 1.7 2006/03/29 04:05:08 uebayasi Exp $

--- src/ptlib/unix/osutil.cxx.orig	2004-09-23 14:00:10.000000000 +0900
+++ src/ptlib/unix/osutil.cxx
@@ -240,11 +240,16 @@
 #define P_USE_LANGINFO
 #endif
 
-#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS)
+#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || defined(P_DRAGONFLY)
 #define P_USE_STRFTIME
 
 #include <sys/param.h>
+#if defined(__NetBSD__) && __NetBSD_Version__ > 299000900
+#include <sys/statvfs.h>
+#define statfs statvfs
+#else
 #include <sys/mount.h>
+#endif
 
 #elif defined(P_HPUX9) 
 #define P_USE_LANGINFO
@@ -685,7 +690,7 @@ PString PDirectory::GetVolume() const
     }
     fclose(fp);
 
-#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS)
+#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || defined(P_DRAGONFLY)
 
     struct statfs * mnt;
     int count = getmntinfo(&mnt, MNT_NOWAIT);
@@ -725,7 +730,7 @@ PString PDirectory::GetVolume() const
 
 BOOL PDirectory::GetVolumeSpace(PInt64 & total, PInt64 & free, DWORD & clusterSize) const
 {
-#if defined(P_LINUX) || defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS)
+#if defined(P_LINUX) || defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || defined(P_DRAGONFLY)
 
   struct statfs fs;
 
@@ -1588,7 +1593,7 @@ int PTime::GetTimeZone(PTime::TimeZoneTy
     return tz;
   else
     return tz + ::daylight*60;
-#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || defined(__BEOS__) || defined(P_QNX)
+#elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || defined(__BEOS__) || defined(P_QNX) || defined(P_DRAGONFLY)
   time_t t;
   time(&t);
   struct tm ts;