Subject: findutils and fnmatch on AIX
To: None <tech-pkg@netbsd.org>
From: Louis Guillaume <lguillaume@berklee.edu>
List: tech-pkg
Date: 08/15/2007 14:39:02
I had to apply these patches (see below) to sysutils/findutils to get
them to install properly on AIX 5.3. Not sure if this is different on
other platforms. I did the diffs against the original "orig" files where
there were already patches in pkgsrc.


Louis





--- lib/fnmatch.c.orig  2007-08-15 12:52:11.000000000 -0400
+++ lib/fnmatch.c       2007-08-15 12:55:00.000000000 -0400
@@ -19,8 +19,10 @@
 #include <config.h>
 #endif

+#define _GNU_SOURCE 1
+
 #include <errno.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
 #include <ctype.h>


--- find/pred.c.orig    1994-11-02 15:59:23.000000000 -0500
+++ find/pred.c 2007-08-15 12:56:30.000000000 -0400
@@ -15,11 +15,13 @@
    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>
 #include <stdio.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
 #include <signal.h>
 #include <pwd.h>
 #include <grp.h>
@@ -27,6 +29,10 @@
 #include "modetype.h"
 #include "wait.h"

+#ifdef __sgi
+#include <libgen.h>
+#endif
+
 #if !defined(SIGCHLD) && defined(SIGCLD)
 #define SIGCHLD SIGCLD
 #endif


--- locate/locate.c.orig        2007-08-15 12:56:41.000000000 -0400
+++ locate/locate.c     2007-08-15 12:57:19.000000000 -0400
@@ -47,12 +47,13 @@
    Written by James A. Woods <jwoods@adobe.com>.
    Modified by David MacKenzie <djm@gnu.ai.mit.edu>.  */

+#define _GNU_SOURCE 1
 #include <config.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
 #include <getopt.h>

 #define NDEBUG