Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From ff1a5b849755db67b1778940fff92d6eb8b8b050 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] 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 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 10 | MIME-Version: 1.0 |
| 11 | Content-Type: text/plain; charset=UTF-8 |
| 12 | Content-Transfer-Encoding: 8bit |
| 13 | |
| 14 | Upstream-Status: Pending |
| 15 | |
| 16 | Stolen from [1] and prettyfied slightly |
| 17 | |
| 18 | [1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches |
| 19 | |
| 20 | Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| 21 | |
| 22 | --- |
| 23 | shared/systemd/src/basic/stdio-util.h | 2 ++ |
| 24 | shared/systemd/src/basic/util.h | 5 +++++ |
| 25 | 2 files changed, 7 insertions(+) |
| 26 | |
| 27 | diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h |
| 28 | index dc67b6e..6336243 100644 |
| 29 | --- a/shared/systemd/src/basic/stdio-util.h |
| 30 | +++ b/shared/systemd/src/basic/stdio-util.h |
| 31 | @@ -1,7 +1,9 @@ |
| 32 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
| 33 | #pragma once |
| 34 | |
| 35 | +#if defined(__GLIBC__) |
| 36 | #include <printf.h> |
| 37 | +#endif |
| 38 | #include <stdarg.h> |
| 39 | #include <stdio.h> |
| 40 | #include <sys/types.h> |
| 41 | diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h |
| 42 | index dc33d66..8ee2d64 100644 |
| 43 | --- a/shared/systemd/src/basic/util.h |
| 44 | +++ b/shared/systemd/src/basic/util.h |
| 45 | @@ -27,6 +27,11 @@ |
| 46 | #include "macro.h" |
| 47 | #include "time-util.h" |
| 48 | |
| 49 | +#if !defined(__GLIBC__) |
| 50 | +typedef int (*__compar_fn_t) (const void*, const void*); |
| 51 | +typedef __compar_fn_t comparison_fn_t; |
| 52 | +#endif |
| 53 | + |
| 54 | size_t page_size(void) _pure_; |
| 55 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) |
| 56 | |