diff options
Diffstat (limited to 'net/netatalk1/patches/patch-aj')
-rw-r--r-- | net/netatalk1/patches/patch-aj | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net/netatalk1/patches/patch-aj b/net/netatalk1/patches/patch-aj new file mode 100644 index 00000000000..14369f89df7 --- /dev/null +++ b/net/netatalk1/patches/patch-aj @@ -0,0 +1,36 @@ +$NetBSD: patch-aj,v 1.1 2006/06/12 15:24:08 joerg Exp $ + +--- bin/psorder/psorder.c.orig 2001-06-29 14:14:46.000000000 +0000 ++++ bin/psorder/psorder.c +@@ -35,6 +35,7 @@ + #include <sys/uio.h> + #include <sys/file.h> + #include <ctype.h> ++#include <limits.h> + #ifdef HAVE_FCNTL_H + #include <fcntl.h> + #endif /* HAVE_FCNTL_H */ +@@ -102,7 +103,11 @@ psorder( path ) + { + int tempfd; + int inputfd; ++#if defined(NAME_MAX) ++ char tempfile[NAME_MAX]; ++#else + char tempfile[MAXNAMLEN]; ++#endif + + filesetup( path, &inputfd, tempfile, &tempfd ); + readps( inputfd, tempfd, tempfile ); +@@ -151,7 +156,11 @@ filesetup( inputfile, infd, tfile, tfd ) + make temporary file + */ + ++#if defined(NAME_MAX) ++ (void *)strncpy( tfile, template, NAME_MAX ); ++#else + (void *)strncpy( tfile, template, MAXNAMLEN ); ++#endif + if (( *tfd = mkstemp( tfile )) == -1 ) { + fprintf( stderr, "can't create temporary file %s\n", tfile ); + filecleanup( -1, -1, "" ); |