Fix: warning: "HAVE_GETIPNODEBYNAME" is not defined
[lttng-tools.git] / src / common / compat / netdb.hpp
index a8bf7e2d08d8efc3a34fdccad7260d210ce974aa..4d5f4f98f9dccf31b16d78649846ddcf69e34a06 100644 (file)
 #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 */
This page took 0.024355 seconds and 4 git commands to generate.