Hi, does anyone knows how to get rid of this annoying warning? Thank you!
#include <netdb.h>
main()
{
gethostbyname("test");
}
$ gcc -static test.c
/tmp/ccW9HG18.o: In function `main':
test.c:(.text+0x19): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
$ nm a.out | grep gethostbyname
0804f660 T __gethostbyname_r
0804f660 T __new_gethostbyname_r
080500b0 T __nscd_gethostbyname2_r
08050110 T __nscd_gethostbyname_r
0804f4a0 T gethostbyname
0804f660 W gethostbyname_r
-----
$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)