summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-12-22 23:00:13 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-12-22 23:00:13 +0100
commitd99a8b957c0254b33ba610b67c76b06fd250196c (patch)
tree995a35a7720622167d1b00c24b54514b3636e819
parent7ea78c2d01a51f50b1ef64c37163d840269fae6f (diff)
Fix cpio build.
-rw-r--r--extra/cpio/PKGBUILD7
-rw-r--r--extra/cpio/gets.patch16
2 files changed, 21 insertions, 2 deletions
diff --git a/extra/cpio/PKGBUILD b/extra/cpio/PKGBUILD
index 1ad697f80..94d607333 100644
--- a/extra/cpio/PKGBUILD
+++ b/extra/cpio/PKGBUILD
@@ -8,12 +8,15 @@ arch=(i686 x86_64 'mips64el')
license=('GPL')
url="http://www.gnu.org/software/cpio"
depends=('glibc')
-source=(ftp://ftp.gnu.org/gnu/cpio/cpio-${pkgver}.tar.gz)
+source=(ftp://ftp.gnu.org/gnu/cpio/cpio-${pkgver}.tar.gz
+ gets.patch)
install=cpio.install
-md5sums=('1112bb6c45863468b5496ba128792f6c')
+md5sums=('1112bb6c45863468b5496ba128792f6c'
+ 'e9e9d1d64a2caa4b9f49b08dc09298db')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p1 -i "$srcdir/gets.patch"
./configure --prefix=/usr --mandir=/usr/share/man
make
}
diff --git a/extra/cpio/gets.patch b/extra/cpio/gets.patch
new file mode 100644
index 000000000..0203b645e
--- /dev/null
+++ b/extra/cpio/gets.patch
@@ -0,0 +1,16 @@
+diff -ru cpio-2.11.orig/gnu/stdio.in.h cpio-2.11/gnu/stdio.in.h
+--- cpio-2.11.orig/gnu/stdio.in.h 2012-12-22 22:48:06.596855514 +0100
++++ cpio-2.11/gnu/stdio.in.h 2012-12-22 22:49:21.496002937 +0100
+@@ -135,12 +135,6 @@
+ "use gnulib module fflush for portable POSIX compliance");
+ #endif
+
+-/* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
+-#undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+-
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)