Always use getaddrinfo() on Linux

Expect the C runtime on Linux to always have getaddrinfo(), glibc 2.1
was released in 1999 so by now every Linux environment should have this
function. This enables use of getaddrinfo() on C libraries other than
glibc, i.e. on musl libc.

This is an alternative approach to the patch posted to the gkrellm
mailinglist by Felix Janda which unfortunately had some drawbacks on
other platforms that need additional includes or libs when using
getaddrinfo(), most notably Solaris and Windows.
This commit is contained in:
Stefan Gehn 2016-01-15 17:59:55 +01:00
parent c53159c3b8
commit 4f676e4cfb
2 changed files with 0 additions and 4 deletions

View File

@ -43,10 +43,8 @@
#endif
#if defined(__linux__)
#if defined(__GLIBC__) && ((__GLIBC__>2)||(__GLIBC__==2 && __GLIBC_MINOR__>=1))
#define HAVE_GETADDRINFO 1
#endif
#endif
#if defined(__DragonFly__)
#define HAVE_GETADDRINFO 1

View File

@ -55,10 +55,8 @@
#if defined(__linux__)
#if defined(__GLIBC__) && ((__GLIBC__>2)||(__GLIBC__==2 && __GLIBC_MINOR__>=1))
#define HAVE_GETADDRINFO 1
#endif
#endif
#if defined(__DragonFly__)
#define HAVE_GETADDRINFO 1