From 4f676e4cfb768940a3292cb5cc64b2c66238d94c Mon Sep 17 00:00:00 2001 From: Stefan Gehn Date: Fri, 15 Jan 2016 17:59:55 +0100 Subject: [PATCH] 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. --- server/gkrellmd-private.h | 2 -- src/client.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/server/gkrellmd-private.h b/server/gkrellmd-private.h index efebadb..f5a229a 100644 --- a/server/gkrellmd-private.h +++ b/server/gkrellmd-private.h @@ -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 diff --git a/src/client.c b/src/client.c index 1ff0acb..00374d0 100644 --- a/src/client.c +++ b/src/client.c @@ -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