tnftp: fixed compilation with glibc 2.8

This commit is contained in:
Antti Nykanen 2008-10-25 18:40:29 +03:00
parent b1897ef17f
commit db331ba359
3 changed files with 19 additions and 1 deletions

View File

@ -1 +1,2 @@
cc85dc7e259efc9e2c0f5dd74da5f808 tnftp-20070806-glibc-2.8.diff
bc78ddc857156f8bc4222d15cce6f76d tnftp-20070806.tar.gz

View File

@ -6,10 +6,12 @@
name=tnftp
version=20070806
release=1
source=(ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/$name-$version.tar.gz)
source=(ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/$name-$version.tar.gz
$name-$version-glibc-2.8.diff)
build() {
cd $name-$version
patch -p1 -i $SRC/$name-$version-glibc-2.8.diff
./configure \
--prefix=$PKG/usr \
--mandir=$PKG/usr/man \

View File

@ -0,0 +1,15 @@
--- tnftp-20070806/tnftp.h.glibc28 2007-08-07 21:37:03.000000000
-0400
+++ tnftp-20070806/tnftp.h 2008-06-20 23:08:14.000000000 -0400
@@ -499,3 +499,11 @@
#define getaddrinfo Rgetaddrinfo
#define getipnodebyname Rgetipnodebyname
#endif /* defined(USE_SOCKS) */
+
+/* GLIBC >= 2.8 have ARG_MAX replaced by _SC_ARG_MAX */
+#ifdef _SC_ARG_MAX
+#ifdef ARG_MAX
+#undef ARG_MAX
+#endif
+#define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif