nsswitch/wins: Define NETDB_* for other libc's
authorlistout <brahmajit.xyz@gmail.com>
Thu, 14 Jul 2022 13:15:17 +0000 (18:45 +0530)
committerVolker Lendecke <vl@samba.org>
Mon, 8 Aug 2022 06:33:38 +0000 (06:33 +0000)
Define NETDB_SUCCESS and NETDB_INTERNAL if they are not defined. On
libc's such as musl NETDB_INTERNAL and NETDB_SUCCESS are not defined.

Signed-off-by: listout <brahmajit.xyz@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
nsswitch/wins.c

index e202a45e26e874adcccd38abf8fca11e1ded2b85..a310477cfad216ddd9a0cc4088bc9969f07a6481 100644 (file)
@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
 #define INADDRSZ 4
 #endif
 
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
+
+#ifndef NETDB_SUCCESS
+#define NETDB_SUCCESS 0
+#endif
+
 _PUBLIC_ON_LINUX_
 NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
                                     struct hostent *he,