Those two functions should, according to Linux man, be defined in unistd.h. We only include it if configure detected it. Could you check the configure output for the test result, and if it's negative, try to find out what we need to include instead for open and gethostname?
When it reports it has gethostbyname, it is checking whether it is available in a library, not in a header. Please look explicitly for the check for unistd.h. Best to send over config.log.
The header looks fine for our purposes (with both functions present), and yes, it's the right one. .../sys/unistd.h is not directly included by us.
Nowhere, I guess. I just remember some talk about config.h being renamed to aa_config.h, but of course, that doesn't affect 0.3.0, only versions from the current trunk.
There's two more removed includes of unistd.h in src/tools/tError.h and src/tools/tSafePTR.h. But before you go and fix them, could you compile with make -k and report all the files with errors? These two headers really shouldn't include unistd.h, it should be done where its contents are needed, and looking for compile errors is the quickest way to idientify where that is
tools/tDirectories.cpp: In function `char* eh_getdir(const char*, size_t*)':
tools/tDirectories.cpp:457: error: `getuid' undeclared (first use this
function)
tools/tDirectories.cpp:457: error: (Each undeclared identifier is reported only
once for each function it appears in.)
gmake[3]: *** [libtools_a-tDirectories.o] Error 1
tools/tSysTime.cpp: In function `void tDelay(int)':
tools/tSysTime.cpp:227: error: `usleep' undeclared (first use this function)
tools/tSysTime.cpp:227: error: (Each undeclared identifier is reported only
once for each function it appears in.)
tools/tSysTime.cpp: In function `void tDelayForce(int)':
tools/tSysTime.cpp:236: error: `usleep' undeclared (first use this function)
gmake[3]: *** [libtools_a-tSysTime.o] Error 1
gmake[3]: Target `all-am' not remade because of errors.
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Target `all' not remade because of errors.
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
Good, only two files, and the manpages say the missing functions are from unistd.h. This must be included automatically over some other header in Linux.
New error after uncommenting those two lines. Any way to turn this httpd stuff off? Well, in the long run its probably better to find the error even if I am not sure why AA need its own httpd server...
thirdparty/shttpd/libshttpd.a(libshttpd_a-shttpd.o)(.text+0x62f): In function `mystrdup':
/opt/source/armagetronad-0.3.0/src/thirdparty/shttpd/shttpd.c:808: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libxml2.so.9.3: warning: strcat() is almost always misused, please use strlcat()
thirdparty/shttpd/libshttpd.a(libshttpd_a-shttpd.o)(.text+0x110): In function `do_thread':
/opt/source/armagetronad-0.3.0/src/thirdparty/shttpd/shttpd.c:510: undefined reference to `pthread_exit'
thirdparty/shttpd/libshttpd.a(libshttpd_a-shttpd.o)(.text+0x18a): In function `do_embedded':
/opt/source/armagetronad-0.3.0/src/thirdparty/shttpd/shttpd.c:589: undefined reference to `pthread_create'
thirdparty/shttpd/libshttpd.a(libshttpd_a-shttpd.o)(.text+0x193):/opt/source/armagetronad-0.3.0/src/thirdparty/shttpd/shttpd.c:590: undefined reference to `pthread_detach'
collect2: ld returned 1 exit status
gmake[3]: *** [armagetronad_main] Error 1
gmake[3]: Target `all-am' not remade because of errors.
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Target `all' not remade because of errors.
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
Those are linker errors now, you need to add something to $LIBS, the library that contains those functions. I thought they were part of the standard c library....
Umm, when we have scripting, I'll be looking at removing the C++ web server and substituting it with a scripted web server instead. It's primarily to give servers their own resource server and an admin interface that doesn't exist yet, and would be better in a script anyway (which is my long term plan).