mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
68 lines
2.1 KiB
Diff
68 lines
2.1 KiB
Diff
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 <akuster808@gmail.com>
|
|
|
|
Index: sssd-2.5.1/src/providers/fail_over.c
|
|
===================================================================
|
|
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
|
|
index 9cb2683..655438c 100644
|
|
--- a/src/providers/fail_over.c
|
|
+++ b/src/providers/fail_over.c
|
|
@@ -31,6 +31,10 @@
|
|
#include <talloc.h>
|
|
#include <netdb.h>
|
|
|
|
+#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 dd36e21..96f279d 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
|
|
diff --git a/src/tools/tools_mc_util.c b/src/tools/tools_mc_util.c
|
|
index a4f3a81..cad1f3e 100644
|
|
--- a/src/tools/tools_mc_util.c
|
|
+++ b/src/tools/tools_mc_util.c
|
|
@@ -168,7 +168,7 @@ static errno_t wait_till_nss_responder_invalidate_cache(void)
|
|
{
|
|
struct stat stat_buf = { 0 };
|
|
const time_t max_wait = 1000000; /* 1 second */
|
|
- const __useconds_t step_time = 5000; /* 5 milliseconds */
|
|
+ const useconds_t step_time = 5000; /* 5 milliseconds */
|
|
const size_t steps_count = max_wait / step_time;
|
|
int ret;
|
|
|