bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem compiling latest gnulib on Solaris 9 i386 with Sun Studio


From: Jim Meyering
Subject: Re: Problem compiling latest gnulib on Solaris 9 i386 with Sun Studio
Date: Fri, 18 Nov 2011 14:05:12 +0100

Dagobert Michelsen wrote:
> I just tried to build a static gnulib as described in
>   
> http://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library
> on Solaris 9 i386 with Sun Studio 12 and got the following error:
>
> source='openat.c' object='openat.o' libtool=no \
> DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
> /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I..
> -DGNULIB_STRICT_CHECKING=1 -I/opt/csw/include -D_REENTRANT -xO3 -m32
> -xarch=386 -c -o openat.o openat.c
> "openat.c", line 99: undefined symbol: errno
> "openat.c", line 99: undefined symbol: EISDIR
> "openat.c", line 131: undefined symbol: errno
> "openat.c", line 131: undefined symbol: ENOTDIR
> cc: acomp failed for openat.c
> gmake[4]: *** [openat.o] Error 2
>
> Adding
>   #include <errno.h>
> to openat.c resolves the issue for me.

Thanks.  I've just pushed this in your name.

>From ff37e81646b996b43d4635ddbb12c4e2654d544b Mon Sep 17 00:00:00 2001
From: Dagobert Michelsen <address@hidden>
Date: Fri, 18 Nov 2011 14:02:51 +0100
Subject: [PATCH] openat: avoid compilation failure due to lack of <errno.h>
 inclusion

* lib/openat.c: Include <errno.h>.
---
 ChangeLog    |    5 +++++
 lib/openat.c |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a373317..e8ac873 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-18  Dagobert Michelsen  <address@hidden>  (tiny change)
+
+       openat: avoid compilation failure due to lack of <errno.h> inclusion
+       * lib/openat.c: Include <errno.h>.
+
 2011-11-17  Paul Eggert  <address@hidden>

        * modules/getcwd (Depends-on): Add fdopendir.
diff --git a/lib/openat.c b/lib/openat.c
index 3225326..354ff80 100644
--- a/lib/openat.c
+++ b/lib/openat.c
@@ -46,6 +46,7 @@ orig_openat (int fd, char const *filename, int flags, mode_t 
mode)
 #include <stddef.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <errno.h>

 #if HAVE_OPENAT

--
1.7.8.rc2.3.g0911



reply via email to

[Prev in Thread] Current Thread [Next in Thread]