void-packages/srcpkgs/nss-pam-ldapd/patches/nss-pam-ldapd-0.9.12-netdb-defines.patch
Klara Modin ee251f9fe2 nss-pam-ldapd: build libnss_ldap.so for musl
Use patch from gentoo for missing define in netdb.h. Disable lookup_netgroup
test for musl which fails otherwise.
2024-09-26 21:01:04 -05:00

26 lines
859 B
Diff

Bug: https://bugs.gentoo.org/716272
--- a/nss/hosts.c
+++ b/nss/hosts.c
@@ -49,6 +49,9 @@
*h_errnop = NO_RECOVERY; \
return NSS_STATUS_UNAVAIL;
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
*errnop = ERANGE; \
--- a/nss/networks.c
+++ b/nss/networks.c
@@ -49,6 +49,9 @@
*h_errnop = NO_RECOVERY; \
return NSS_STATUS_UNAVAIL;
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
*errnop = ERANGE; \