Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 1 | From e92de7409a3e107f90d108a9c5d49bd0418296dd Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 3 | Date: Thu, 22 Mar 2018 17:54:10 +0100 |
| 4 | Subject: [PATCH 1/4] Usual fix for musl libc |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Stolen from [1] and prettyfied slightly |
| 12 | |
| 13 | [1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches |
| 14 | |
| 15 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 16 | --- |
| 17 | src/systemd/src/basic/stdio-util.h | 2 ++ |
| 18 | src/systemd/src/basic/util.h | 5 +++++ |
| 19 | 2 files changed, 7 insertions(+) |
| 20 | |
| 21 | diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h |
| 22 | index bd1144b..9eafacb 100644 |
| 23 | --- a/src/systemd/src/basic/stdio-util.h |
| 24 | +++ b/src/systemd/src/basic/stdio-util.h |
| 25 | @@ -19,7 +19,9 @@ |
| 26 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
| 27 | ***/ |
| 28 | |
| 29 | +#if defined(__GLIBC__) |
| 30 | #include <printf.h> |
| 31 | +#endif |
| 32 | #include <stdarg.h> |
| 33 | #include <stdio.h> |
| 34 | #include <sys/types.h> |
| 35 | diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h |
| 36 | index b31dfd1..9b7032c 100644 |
| 37 | --- a/src/systemd/src/basic/util.h |
| 38 | +++ b/src/systemd/src/basic/util.h |
| 39 | @@ -46,6 +46,11 @@ |
| 40 | #include "missing.h" |
| 41 | #include "time-util.h" |
| 42 | |
| 43 | +#if !defined(__GLIBC__) |
| 44 | +typedef int (*__compar_fn_t) (const void*, const void*); |
| 45 | +typedef __compar_fn_t comparison_fn_t; |
| 46 | +#endif |
| 47 | + |
| 48 | size_t page_size(void) _pure_; |
| 49 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) |
| 50 | |
| 51 | -- |
| 52 | 2.14.3 |
| 53 | |