aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2008-04-12 00:11:53 +0800
committernaddy <naddy@FreeBSD.org>2008-04-12 00:11:53 +0800
commit6960def510eecfc44d3c8bfa57c88f2a76195388 (patch)
tree3537753bcbcfe22585ccaabb5d38caa10386dc87
parent1a49de43673d19b37998cb0955311b927d64d246 (diff)
downloadfreebsd-ports-graphics-6960def510eecfc44d3c8bfa57c88f2a76195388.tar.gz
freebsd-ports-graphics-6960def510eecfc44d3c8bfa57c88f2a76195388.tar.zst
freebsd-ports-graphics-6960def510eecfc44d3c8bfa57c88f2a76195388.zip
Work around the assumption that openat() implies the existence of
fdopendir(). FreeBSD 8 has the former, but not the latter. PR: 122433
-rw-r--r--archivers/gtar/Makefile3
-rw-r--r--archivers/gtar/files/patch-lib_getcwd.c16
2 files changed, 19 insertions, 0 deletions
diff --git a/archivers/gtar/Makefile b/archivers/gtar/Makefile
index bb59fd5933c..72bdc66e378 100644
--- a/archivers/gtar/Makefile
+++ b/archivers/gtar/Makefile
@@ -25,6 +25,9 @@ CONFIGURE_ENV= CPPFLAGS='-I${LOCALBASE}/include' \
LDFLAGS='-L${LOCALBASE}/lib ${LDSTATIC}' \
DEFAULT_ARCHIVE=/dev/sa0 \
DEFAULT_RMT_COMMAND=/etc/rmt
+# GNU assumes that openat() implies the existence of fdopendir(),
+# which does not hold true on FreeBSD 8.
+CONFIGURE_ENV+= ac_cv_func_openat=no
.if defined(WANT_STATIC)
LDSTATIC= -static
diff --git a/archivers/gtar/files/patch-lib_getcwd.c b/archivers/gtar/files/patch-lib_getcwd.c
new file mode 100644
index 00000000000..754edc92561
--- /dev/null
+++ b/archivers/gtar/files/patch-lib_getcwd.c
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- lib/getcwd.c.orig
++++ lib/getcwd.c
+@@ -30,6 +30,10 @@
+
+ #include <fcntl.h> /* For AT_FDCWD on Solaris 9. */
+
++#ifdef __FreeBSD__
++# undef AT_FDCWD
++#endif
++
+ #ifndef __set_errno
+ # define __set_errno(val) (errno = (val))
+ #endif