#include <netdb.h>
#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 */