X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fnetdb.hpp;h=4d5f4f98f9dccf31b16d78649846ddcf69e34a06;hb=69e98ad60c01ddfbfa6eb843960f77804173dd0f;hp=a8bf7e2d08d8efc3a34fdccad7260d210ce974aa;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/common/compat/netdb.hpp b/src/common/compat/netdb.hpp index a8bf7e2d0..4d5f4f98f 100644 --- a/src/common/compat/netdb.hpp +++ b/src/common/compat/netdb.hpp @@ -11,19 +11,19 @@ #include #ifdef HAVE_GETHOSTBYNAME2 -static inline -struct hostent *lttng_gethostbyname2(const char *name, int af) { +static inline struct hostent *lttng_gethostbyname2(const char *name, int af) +{ return gethostbyname2(name, af); } -#elif HAVE_GETIPNODEBYNAME -static inline -struct hostent *lttng_gethostbyname2(const char *name, int af) { +#elif defined(HAVE_GETIPNODEBYNAME) +static inline struct hostent *lttng_gethostbyname2(const char *name, int af) +{ int unused; return getipnodebyname(name, af, AI_DEFAULT, &unused); } #else -# error "Missing compat for gethostbyname2()" +#error "Missing compat for gethostbyname2()" #endif #endif /* _COMPAT_NETDB_H */