Jan Andersen wrote on bug-tar: > I am trying to build tar from source on AIX 5L, but it fails with: > > CC priv-set.o > In file included from priv-set.c:23: > priv-set.h:24:19: error: priv.h: A file or directory in the path name does > not exist. > ... > > I have tried to #undef HAVE_PRIV_H in config.h, but it seems to have no > effect.
To work around the bug temporarily, you can install the following patch into lib/priv-set.h and lib/priv-set.c (but don't patch the other files unless you have developer tools). I have installed this patch into gnulib, so the problem should be fixed more permanently in the next tar release. Thanks for reporting the problem. priv-set: Don't assume that priv.h exists merely because getppriv does. See Jan Andersen's bug report about AIX 5L in http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00019.html * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h. * lib/priv-set.c: Do nothing unless HAVE_PRIV_H. * lib/priv-set.h: Likewise. * tests/test-priv-set.c: Likewise. diff --git a/lib/priv-set.c b/lib/priv-set.c index 911c280..0ac1b97 100644 --- a/lib/priv-set.c +++ b/lib/priv-set.c @@ -20,7 +20,7 @@ #include <config.h> #include "priv-set.h" -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include <errno.h> # include <stdbool.h> diff --git a/lib/priv-set.h b/lib/priv-set.h index b8f8b72..5cac9ce 100644 --- a/lib/priv-set.h +++ b/lib/priv-set.h @@ -17,7 +17,7 @@ Written by David Bartley. */ -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include <priv.h> diff --git a/m4/priv-set.m4 b/m4/priv-set.m4 index 205b00c..aaa1896 100644 --- a/m4/priv-set.m4 +++ b/m4/priv-set.m4 @@ -1,4 +1,4 @@ -# serial 6 +# serial 7 # Copyright (C) 2009, 2010 Free Software Foundation, Inc. # @@ -12,4 +12,5 @@ AC_DEFUN([gl_PRIV_SET], [ AC_REQUIRE([AC_C_INLINE]) AC_CHECK_FUNCS([getppriv]) + AC_CHECK_HEADERS_ONCE([priv.h]) ]) diff --git a/tests/test-priv-set.c b/tests/test-priv-set.c index 49ad388..4b17f0c 100644 --- a/tests/test-priv-set.c +++ b/tests/test-priv-set.c @@ -20,7 +20,7 @@ #include "priv-set.h" -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include <priv.h> #endif #include <unistd.h> @@ -32,7 +32,7 @@ int main (void) { -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H priv_set_t *set; ASSERT (set = priv_allocset ());