From db331ba359b328eec7800d7bb2e872890f45c43b Mon Sep 17 00:00:00 2001 From: Antti Nykanen Date: Sat, 25 Oct 2008 18:40:29 +0300 Subject: [PATCH] tnftp: fixed compilation with glibc 2.8 --- tnftp/.md5sum | 1 + tnftp/Pkgfile | 4 +++- tnftp/tnftp-20070806-glibc-2.8.diff | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tnftp/tnftp-20070806-glibc-2.8.diff diff --git a/tnftp/.md5sum b/tnftp/.md5sum index 912d74c70..793c57f92 100644 --- a/tnftp/.md5sum +++ b/tnftp/.md5sum @@ -1 +1,2 @@ +cc85dc7e259efc9e2c0f5dd74da5f808 tnftp-20070806-glibc-2.8.diff bc78ddc857156f8bc4222d15cce6f76d tnftp-20070806.tar.gz diff --git a/tnftp/Pkgfile b/tnftp/Pkgfile index 2372a4304..d1067cac7 100644 --- a/tnftp/Pkgfile +++ b/tnftp/Pkgfile @@ -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 \ diff --git a/tnftp/tnftp-20070806-glibc-2.8.diff b/tnftp/tnftp-20070806-glibc-2.8.diff new file mode 100644 index 000000000..09ab8e95a --- /dev/null +++ b/tnftp/tnftp-20070806-glibc-2.8.diff @@ -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