blob: 8d905489ffc7859740d22ca54994a61108b296a9 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From ff1a5b849755db67b1778940fff92d6eb8b8b050 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Thu, 22 Mar 2018 17:54:10 +0100
4Subject: [PATCH] Usual fix for musl libc
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
10MIME-Version: 1.0
11Content-Type: text/plain; charset=UTF-8
12Content-Transfer-Encoding: 8bit
13
14Upstream-Status: Pending
15
16Stolen from [1] and prettyfied slightly
17
18[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches
19
20Signed-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
27diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
28index 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>
41diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h
42index 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