diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-18 21:42:46 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-18 21:42:46 +0000 |
commit | 9d9c3ebff6ac5d51be2ea1bb6eb9ef4dd1f908f4 (patch) | |
tree | 76226fdb45dc7330368e86b32b9031f615d1b862 /app-arch/cpio/files | |
parent | Mark 0.8.11 stable on ia64 (diff) | |
download | historical-9d9c3ebff6ac5d51be2ea1bb6eb9ef4dd1f908f4.tar.gz historical-9d9c3ebff6ac5d51be2ea1bb6eb9ef4dd1f908f4.tar.bz2 historical-9d9c3ebff6ac5d51be2ea1bb6eb9ef4dd1f908f4.zip |
Fix by Benigno B. Junior for building on *BSD systems #123237.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-arch/cpio/files')
-rw-r--r-- | app-arch/cpio/files/cpio-2.6-stpcpy-hack.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/app-arch/cpio/files/cpio-2.6-stpcpy-hack.patch b/app-arch/cpio/files/cpio-2.6-stpcpy-hack.patch new file mode 100644 index 000000000000..c5f0d855a8c0 --- /dev/null +++ b/app-arch/cpio/files/cpio-2.6-stpcpy-hack.patch @@ -0,0 +1,50 @@ +This is a hack to provide stpcpy on systems where the system libc does +not provide the function. Upstream has incorporated a proper fix that +utilizes gnulib; we use this version instead because it is much smaller. + +Patch by Benigno B. Junior + +http://bugs.gentoo.org/123237 + +--- cpio-2.6/configure ++++ cpio-2.6/configure +@@ -11727,7 +11726,7 @@ + + + +-for ac_func in bcopy mkdir strdup strerror ++for ac_func in bcopy mkdir strdup strerror stpcpy + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 +--- cpio-2.6/config.h.in ++++ cpio-2.6/config.h.in +@@ -251,6 +251,9 @@ + /* Define to 1 if you have the <stdlib.h> header file. */ + #undef HAVE_STDLIB_H + ++/* Define to 1 if you have the `stpcpy' function. */ ++#undef HAVE_STPCPY ++ + /* Define to 1 if you have the `strcasecmp' function. */ + #undef HAVE_STRCASECMP + +--- cpio-2.6/src/copyout.c ++++ cpio-2.6/src/copyout.c +@@ -356,7 +356,16 @@ + char ascii_header[110]; + char *p; + ++#ifdef HAVE_STPCPY + p = stpcpy (ascii_header, magic_string); ++#else ++ { ++ unsigned long __length = strlen (magic_string); ++ memcpy (ascii_header, magic_string, __length); ++ p += __length; ++ } ++#endif ++ + to_ascii_or_warn (p, file_hdr->c_ino, 8, LG_16, + file_hdr->c_name, _("inode number")); + p += 8; |