On Solaris 8, I'm seeing this link error: g++ -o test-unistd-c++ test-unistd-c++.o ../gllib/libgnu.a -lrt -lsocket Undefined first referenced symbol in file eaccess ../gllib/libgnu.a(euidaccess.o) ld: fatal: Symbol referencing errors. No output written to test-unistd-c++ collect2: ld returned 1 exit status *** Error code 1
It's because eaccess() is defined in libgen on this platform. This fixes it: 2010-12-25 Bruno Haible <br...@clisp.org> unistd: Fix C++ link error on Solaris 8. * modules/unistd-c++-tests (test_unistd_c___LDADD): Add $(LIB_EACCESS). --- modules/unistd-c++-tests.orig Sat Dec 25 16:44:23 2010 +++ modules/unistd-c++-tests Sat Dec 25 16:40:45 2010 @@ -15,5 +15,5 @@ TESTS += test-unistd-c++ check_PROGRAMS += test-unistd-c++ test_unistd_c___SOURCES = test-unistd-c++.cc -test_unistd_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIBSOCKET) +test_unistd_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIBSOCKET) endif