Subject: pkg/33067: patches of misc/fd
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Osamu OISHI <oishi@alef.ims.ac.jp>
List: pkgsrc-bugs
Date: 03/13/2006 04:00:01
>Number: 33067
>Category: pkg
>Synopsis: misc/fd cannot be compiled on NetBSD-3.0.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Mar 13 04:00:00 +0000 2006
>Originator: Osamu OISHI
>Release: NetBSD 2.0
>Organization:
>Environment:
System: NetBSD alef.ims.ac.jp 2.0 NetBSD 2.0 (alef) #2: Fri Apr 15 18:15:17 UTC 2005 root@alef.ims.ac.jp:/usr/src/sys/arch/i386/compile/alef i386
Architecture: i386
Machine: i386
>Description:
Since the description of "statfs" in /usr/include/sys/mount.h was changed,
misc/fd cannot be compiled on NetBSD-3.0.
Therefore, patch-ab and patch-ac were added.
change files: patches/patch-ab, patches/patch-ac, distinfo
diff -Nur fd.orig/distinfo fd/distinfo
--- fd.orig/distinfo 2005-02-24 11:02:51.000000000 +0000
+++ fd/distinfo 2006-03-11 08:49:18.000000000 +0000
@@ -4,3 +4,5 @@
RMD160 (FD-1.03u.tar.gz) = 943a706dc64c81397c71babe7eab332341b3cc09
Size (FD-1.03u.tar.gz) = 340097 bytes
SHA1 (patch-aa) = 7877fcbf53da90e6d10fa57e3c6f55c761e9f11c
+SHA1 (patch-ab) = 874fd3b374b808710feed6d335985ae419774005
+SHA1 (patch-ac) = 5fe721e63dc2ed51df659b2a6f705fb595f16aef
diff -Nur fd.orig/patches/patch-ab fd/patches/patch-ab
--- fd.orig/patches/patch-ab 1970-01-01 00:00:00.000000000 +0000
+++ fd/patches/patch-ab 2006-03-13 12:28:55.000000000 +0000
@@ -0,0 +1,60 @@
+$NetBSD:$
+--- info.c.orig 2001-12-18 00:00:00.000000000 +0900
++++ info.c 2006-03-11 17:42:36.000000000 +0900
+@@ -10,6 +10,7 @@
+ #include "funcno.h"
+ #include "kctype.h"
+ #include "kanji.h"
++#include "machine.h"
+
+ #ifdef NOERRNO
+ extern int errno;
+@@ -144,7 +145,11 @@
+
+ #ifdef USEMOUNTH
+ #include <sys/mount.h>
++#if defined(__LIBC12_SOURCE__)
++typedef struct statfs12 statfs_t;
++#else
+ typedef struct statfs statfs_t;
++#endif
+ #define blocksize(fs) (fs).f_bsize
+ #endif /* USEMOUNTH */
+
+@@ -480,7 +485,11 @@
+ static FILE *NEAR setmntent(file, mode)
+ char *file, *mode;
+ {
++#if defined(__LIBC12_SOURCE__)
++ struct statfs12 *buf;
++#else
+ struct statfs *buf;
++#endif
+ int size;
+
+ buf = NULL;
+@@ -512,7 +521,11 @@
+ static char *fsname = NULL;
+ static char *dir = NULL;
+ static char *type = NULL;
++#if defined(__LIBC12_SOURCE__)
++ struct statfs12 *buf;
++#else
+ struct statfs *buf;
++#endif
+ #ifdef USEMNTINFO
+ # ifdef USEVFCNAME
+ struct vfsconf *conf;
+@@ -541,7 +554,11 @@
+ int len;
+
+ if (mnt_ptr >= mnt_size) return(NULL);
+- buf = (struct statfs *)fp;
++#if defined(__LIBC12_SOURCE__)
++ buf = (struct statfs12 *)fp;
++#else
++ buf = (struct statfs12 *)fp;
++#endif
+
+ len = strlen(buf[mnt_ptr].f_mntfromname) + 1;
+ fsname = realloc2(fsname, len);
diff -Nur fd.orig/patches/patch-ac fd/patches/patch-ac
--- fd.orig/patches/patch-ac 1970-01-01 00:00:00.000000000 +0000
+++ fd/patches/patch-ac 2006-03-13 12:29:08.000000000 +0000
@@ -0,0 +1,13 @@
+$NetBSD:$
+--- machine.h.orig 2006-03-11 12:24:23.000000000 +0900
++++ machine.h 2006-03-11 12:25:17.000000000 +0900
+@@ -503,6 +503,9 @@
+ #define GETPGRPVOID
+ #define USESETPGID
+ #define SIGFNCINT
+ #include <sys/param.h>
++#if (__NetBSD_Version__ >= 300000000)
++#define __LIBC12_SOURCE__
++#endif
+ # if defined (NetBSD1_0) && (NetBSD1_0 < 1)
+ # define USEFFSIZE
>How-To-Repeat:
>Fix:
>Unformatted: