From abb66c871d5571accff49a281730246a057b4967 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 4 Jul 2021 08:50:06 -0700 Subject: [PATCH] fix musl build failures Missing _PATH_HOSTS and some NETDB defines when musl is enabled. These are work arounds for now while we figure out where the real fix should reside (musl, gcompact, sssd): ./sssd-2.5.1/src/providers/fail_over.c:1199:19: error: '_PATH_HOSTS' undeclared (first use in this function) | 1199 | _PATH_HOSTS); | | ^~~~~~~~~~~ and i./sssd-2.5.1/src/sss_client/nss_ipnetworks.c:415:21: error: 'NETDB_INTERNAL' undeclared (first use in this function) | 415 | *h_errnop = NETDB_INTERNAL; Upstream-Status: Pending Signed-off-by: Armin Kuster --- src/providers/fail_over.c | 4 ++++ src/sss_client/sss_cli.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index 835ac52..dea4fab 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -33,6 +33,10 @@ #include #include +#if !defined(_PATH_HOSTS) +#define _PATH_HOSTS "/etc/hosts" +#endif + #include "util/dlinklist.h" #include "util/refcount.h" #include "util/util.h" diff --git a/src/sss_client/sss_cli.h b/src/sss_client/sss_cli.h index 29b496e..c47e776 100644 --- a/src/sss_client/sss_cli.h +++ b/src/sss_client/sss_cli.h @@ -44,6 +44,14 @@ typedef int errno_t; #define EOK 0 #endif +#ifndef NETDB_INTERNAL +# define NETDB_INTERNAL (-1) +#endif + +#ifndef NETDB_SUCCESS +# define NETDB_SUCCESS (0) +#endif + #define SSS_NSS_PROTOCOL_VERSION 1 #define SSS_PAM_PROTOCOL_VERSION 3 #define SSS_SUDO_PROTOCOL_VERSION 1