49 lines
2 KiB
Text
49 lines
2 KiB
Text
$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;
|