Subject: pkg/20798: portability fixes for pkgsrc/sysutils/findutils
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 03/18/2003 22:25:11
>Number:         20798
>Category:       pkg
>Synopsis:       portability fixes for pkgsrc/sysutils/findutils
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 18 22:26:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
findutils has problems building under Linux.
>How-To-Repeat:
>Fix:
Please consider these patches (which appear to be fine under NetBSD
also).

diff -urN findutils.orig/Makefile findutils/Makefile
--- findutils.orig/Makefile	Wed Dec 25 09:56:46 2002
+++ findutils/Makefile	Tue Mar 18 22:13:35 2003
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.7 2002/12/25 17:56:46 wiz Exp $
 
 DISTNAME=	findutils-4.1
-PKGREVISION=	2
+PKGREVISION=	3
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_GNU:=findutils/}
 
diff -urN findutils.orig/distinfo findutils/distinfo
--- findutils.orig/distinfo	Tue Oct 22 04:35:40 2002
+++ findutils/distinfo	Thu Oct 31 16:47:21 2002
@@ -6,3 +6,10 @@
 SHA1 (patch-ab) = 13664baa3e9348413416c920776be659d5dc59c3
 SHA1 (patch-ac) = 2443dab53a9bc738cdb16e46b5aa7893ee7c13aa
 SHA1 (patch-ad) = 4f28e677b099e60b0097b0f7358dc4c51f07e1aa
+SHA1 (patch-ae) = 2f0606dfd6911910b31292f40f9b4c21488baa6a
+SHA1 (patch-af) = 5570d353dab8793cc9e6a283b325f93e40164b8b
+SHA1 (patch-ag) = d66c7c5ab9d84b4a30bd27e6d609f683d0f3de3e
+SHA1 (patch-ah) = 25fa8766b1bb4bca6709ec9c11f5dcadf489b70b
+SHA1 (patch-ai) = b87142967fe9f0a66f4c8203513447c70cff2401
+SHA1 (patch-aj) = be9793a1c825178c70653ce746825872ea2965e9
+SHA1 (patch-ak) = 32c00dc2d6bc01794e3d3476366ea450511fa312
diff -urN findutils.orig/patches/patch-ae findutils/patches/patch-ae
--- findutils.orig/patches/patch-ae	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-ae	Thu Oct 31 16:41:43 2002
@@ -0,0 +1,11 @@
+--- find/defs.h	Wed Nov  2 15:59:15 1994
++++ find/defs.h	Tue May  2 15:30:31 2000
+@@ -301,7 +301,7 @@
+ boolean mark_stat P_((struct predicate *tree));
+ 
+ /* util.c */
+-char *basename P_((char *fname));
++char *basename2 P_((char *fname));
+ struct predicate *get_new_pred P_((void));
+ struct predicate *get_new_pred_chk_op P_((void));
+ struct predicate *insert_primary P_((boolean (*pred_func )()));
diff -urN findutils.orig/patches/patch-af findutils/patches/patch-af
--- findutils.orig/patches/patch-af	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-af	Thu Oct 31 16:42:00 2002
@@ -0,0 +1,10 @@
+--- find/parser.c	Wed Nov  2 15:59:19 1994
++++ find/parser.c	Tue May  2 15:33:12 2000
+@@ -52,7 +52,6 @@
+ #define lstat stat
+ #endif
+ 
+-char *strstr ();
+ int lstat ();
+ int stat ();
+ #ifndef atol /* for Linux */
diff -urN findutils.orig/patches/patch-ag findutils/patches/patch-ag
--- findutils.orig/patches/patch-ag	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-ag	Thu Oct 31 16:42:20 2002
@@ -0,0 +1,11 @@
+--- find/pred.c	Wed Nov  2 15:59:23 1994
++++ find/pred.c	Tue May  2 15:38:51 2000
+@@ -15,6 +15,8 @@
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
++#define _GNU_SOURCE
++
+ #include <config.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff -urN findutils.orig/patches/patch-ah findutils/patches/patch-ah
--- findutils.orig/patches/patch-ah	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-ah	Thu Oct 31 16:42:40 2002
@@ -0,0 +1,11 @@
+--- find/util.c	Thu Oct 20 00:49:47 1994
++++ find/util.c	Tue May  2 15:41:59 2000
+@@ -25,7 +25,7 @@
+    compressed into one slash. */
+ 
+ char *
+-basename (fname)
++basename2 (fname)
+      char *fname;
+ {
+   char *p;
diff -urN findutils.orig/patches/patch-ai findutils/patches/patch-ai
--- findutils.orig/patches/patch-ai	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-ai	Thu Oct 31 16:42:59 2002
@@ -0,0 +1,10 @@
+--- lib/nextelem.c	Tue Sep 27 09:02:45 1994
++++ lib/nextelem.c	Tue May  2 15:35:12 2000
+@@ -32,7 +32,6 @@
+ #endif
+ #endif
+ 
+-char *strdup ();
+ void free ();
+ 
+ /* Return the next element of a colon-separated path.
diff -urN findutils.orig/patches/patch-aj findutils/patches/patch-aj
--- findutils.orig/patches/patch-aj	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-aj	Thu Oct 31 16:43:12 2002
@@ -0,0 +1,12 @@
+--- xargs/xargs.c	Fri Oct  7 13:21:39 1994
++++ xargs/xargs.c	Tue May  2 15:39:46 2000
+@@ -60,9 +60,6 @@
+ #define memcpy(dest, source, count) (bcopy((source), (dest), (count)))
+ #endif
+ 
+-char *strstr ();
+-char *strdup ();
+-
+ #ifndef _POSIX_SOURCE
+ #include <sys/param.h>
+ #endif
diff -urN findutils.orig/patches/patch-ak findutils/patches/patch-ak
--- findutils.orig/patches/patch-ak	Wed Dec 31 16:00:00 1969
+++ findutils/patches/patch-ak	Thu Oct 31 16:46:55 2002
@@ -0,0 +1,12 @@
+--- find/fstype.c	Thu Nov  3 11:33:48 1994
++++ find/fstype.c	Tue May  2 15:31:42 2000
+@@ -30,9 +30,6 @@
+ extern int errno;
+ #endif
+ 
+-char *strdup ();
+-char *strstr ();
+-
+ static char *filesystem_type_uncached P_((char *path, char *relpath, struct stat *statp));
+ static int xatoi P_((char *cp));
+ 
>Release-Note:
>Audit-Trail:
>Unformatted: