Subject: pkg/33119: pwlib don't build
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <oht@users.sourceforge.net>
List: pkgsrc-bugs
Date: 03/21/2006 22:10:01
>Number:         33119
>Category:       pkg
>Synopsis:       pwlib don't build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 21 22:10:00 +0000 2006
>Originator:     Ole
>Release:        3.0
>Organization:
Home user
>Environment:
NetBSD amd64.oxen 3.0 NetBSD 3.0 (GENERIC) #0: Sun Dec 18 21:51:37 UTC 2005  builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/amd64/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
Error in compilation due to statfs
>How-To-Repeat:
cd /usr/pkgsrc/devel/pwlib/
make
>Fix:
add following changes to  patch-ad ( works on amd64) :
--- src/ptlib/unix/osutil.cxx.bu        2006-03-21 22:43:21.000000000 +0100
+++ src/ptlib/unix/osutil.cxx   2006-03-21 22:46:50.000000000 +0100
@@ -692,7 +692,7 @@
 
 #elif defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_MACOS) || d
efined(P_DRAGONFLY)
 
-    struct statfs * mnt;
+    struct statvfs * mnt;
     int count = getmntinfo(&mnt, MNT_NOWAIT);
     for (int i = 0; i < count; i++) {
       if (stat(mnt[i].f_mntonname, &status) != -1 && status.st_dev == my_dev) {
@@ -732,9 +732,9 @@
 {
 #if defined(P_LINUX) || defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || def
ined(P_MACOS) || defined(P_DRAGONFLY)
 
-  struct statfs fs;
+  struct statvfs fs;
 
-  if (statfs(operator+("."), &fs) == -1)
+  if (statvfs(operator+("."), &fs) == -1)
     return FALSE;
 
   clusterSize = fs.f_bsize;