From: Paul Eggert Date: Tue, 26 Oct 2010 20:48:34 +0000 (-0700) Subject: renameat: port to Solaris 10, which declares renameat in unistd.h X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6da7b8a1733c379d83744df595b123f2fc5606a7;hp=13d1650b8ba2db75bad3b481618220a448a34cf2;p=pspp renameat: port to Solaris 10, which declares renameat in unistd.h * lib/renameat.c: Include unistd.h before stdio.h, because Solaris 10 declares renameat in unistd.h. Problem encountered when building GNU tar 1.24 on Solaris 10. --- diff --git a/ChangeLog b/ChangeLog index f18abb16ea..38888bf12d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-10-26 Paul Eggert + + renameat: port to Solaris 10, which declares renameat in unistd.h + + * lib/renameat.c: Include unistd.h before stdio.h, because + Solaris 10 declares renameat in unistd.h. Problem encountered + when building GNU tar 1.24 on Solaris 10. + 2010-10-26 Christian Weisgerber (tiny change) fdopendir: fix C89 compilation diff --git a/lib/renameat.c b/lib/renameat.c index f294765043..692fd52ae5 100644 --- a/lib/renameat.c +++ b/lib/renameat.c @@ -18,6 +18,12 @@ #include +/* Solaris 10, which predates POSIX-2008, declares its renameat in + unistd.h. Include unistd.h before including stdio.h, so that + gnulib's stdio.h doesn't #define renameat to rpl_renameat before + Solaris 10's unistd.h declares the system renameat. */ +#include + #include #if HAVE_RENAMEAT