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 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 4 | Subject: [PATCH] Usual fix for musl libc |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 16 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | --- |
| 18 | src/systemd/src/basic/stdio-util.h | 2 ++ |
| 19 | src/systemd/src/basic/util.h | 5 +++++ |
| 20 | 2 files changed, 7 insertions(+) |
| 21 | |
| 22 | diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 23 | index 73c0327..e1ce64f 100644 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 24 | --- a/src/systemd/src/basic/stdio-util.h |
| 25 | +++ b/src/systemd/src/basic/stdio-util.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 26 | @@ -1,7 +1,9 @@ |
| 27 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
| 28 | #pragma once |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 29 | |
| 30 | +#if defined(__GLIBC__) |
| 31 | #include <printf.h> |
| 32 | +#endif |
| 33 | #include <stdarg.h> |
| 34 | #include <stdio.h> |
| 35 | #include <sys/types.h> |
| 36 | diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h |
| 37 | index b31dfd1..9b7032c 100644 |
| 38 | --- a/src/systemd/src/basic/util.h |
| 39 | +++ b/src/systemd/src/basic/util.h |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 40 | @@ -28,6 +28,11 @@ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 41 | #include "missing.h" |
| 42 | #include "time-util.h" |
| 43 | |
| 44 | +#if !defined(__GLIBC__) |
| 45 | +typedef int (*__compar_fn_t) (const void*, const void*); |
| 46 | +typedef __compar_fn_t comparison_fn_t; |
| 47 | +#endif |
| 48 | + |
| 49 | size_t page_size(void) _pure_; |
| 50 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) |
| 51 | |
| 52 | -- |
| 53 | 2.14.3 |
| 54 | |