mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-20 16:12:22 +01:00
52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
From 2ab442623e689532910b34ff0dbbc2167da02330 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Wed, 11 Jan 2017 17:39:07 -0600
|
|
Subject: [PATCH] fix musl compatibility (missing function prototypes)
|
|
|
|
inet_net_pton is already compiled, but no prototype is provided.
|
|
res_hnok is provided by the compatibility layer in libasr.
|
|
|
|
These fixes avoid warnings about implicit function declaration.
|
|
|
|
Fixes #758
|
|
---
|
|
configure.ac | 1 +
|
|
openbsd-compat/openbsd-compat.h | 8 ++++++++
|
|
2 files changed, 9 insertions(+)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 42e092f..e27c514 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -594,6 +594,7 @@ AC_CHECK_FUNCS([ \
|
|
pledge \
|
|
pw_dup \
|
|
reallocarray \
|
|
+ res_hnok \
|
|
setenv \
|
|
setlinebuf \
|
|
setproctitle \
|
|
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
|
|
index a51385b..5d2e2c2 100644
|
|
--- a/openbsd-compat/openbsd-compat.h
|
|
+++ b/openbsd-compat/openbsd-compat.h
|
|
@@ -208,10 +208,18 @@ void *reallocarray(void *, size_t, size_t);
|
|
void errc(int, int, const char *, ...);
|
|
#endif
|
|
|
|
+#ifndef HAVE_INET_NET_PTON
|
|
+int inet_net_pton(int, const char *, void *, size_t);
|
|
+#endif
|
|
+
|
|
#ifndef HAVE_PLEDGE
|
|
#define pledge(promises, paths) 0
|
|
#endif
|
|
|
|
+#ifndef HAVE_RES_HNOK
|
|
+int res_hnok(const char *);
|
|
+#endif
|
|
+
|
|
#if !HAVE_DECL_AF_LOCAL
|
|
#define AF_LOCAL AF_UNIX
|
|
#endif
|