-From a4f51ef07375466f79cb148ff1178ed11f808f0a Mon Sep 17 00:00:00 2001
+From 5513b918d02900a3a78fd0e0300a118b163edfef Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 13:55:12 +0800
-Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t
+Subject: [PATCH] missing_type.h: add comparison_fn_t
-Make it work with musl where comparison_fn_t and __compare_fn_t
-is not provided.
-
-Revisit this when upgrading to 251+ systemd since systemd does not need
-__compare_fn_t anymore
+Make it work with musl where comparison_fn_t and is not provided.
Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
[Rebased for v242]
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
+[Rebased for v250, Drop __compare_fn_t]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
- src/basic/missing_type.h | 9 +++++++++
+ src/basic/missing_type.h | 4 ++++
src/basic/sort-util.h | 1 +
- src/core/kmod-setup.c | 1 +
src/libsystemd/sd-journal/catalog.c | 1 +
- 4 files changed, 12 insertions(+)
+ 3 files changed, 6 insertions(+)
diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index f6233090a9..aeaf6ad5ec 100644
+index f6233090a9..6c0456349d 100644
--- a/src/basic/missing_type.h
+++ b/src/basic/missing_type.h
-@@ -10,3 +10,12 @@
+@@ -10,3 +10,7 @@
#if !HAVE_CHAR16_T
#define char16_t uint16_t
#endif
+#ifndef __GLIBC__
+typedef int (*comparison_fn_t)(const void *, const void *);
+#endif
-+
-+#ifndef __COMPAR_FN_T
-+#define __COMPAR_FN_T
-+typedef int (*__compar_fn_t)(const void *, const void *);
-+#endif
diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index cb448df109..fd738a65ab 100644
+index 02a6784d99..0b33c83d59 100644
--- a/src/basic/sort-util.h
+++ b/src/basic/sort-util.h
@@ -4,6 +4,7 @@
/* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
* external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
-diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index d054668b8e..d3bf55acbe 100644
---- a/src/core/kmod-setup.c
-+++ b/src/core/kmod-setup.c
-@@ -10,6 +10,7 @@
- #include "macro.h"
- #include "recurse-dir.h"
- #include "string-util.h"
-+#include "missing_type.h"
-
- #if HAVE_KMOD
- #include "module-util.h"
diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
index 8fc87b131a..36a6efdbd8 100644
--- a/src/libsystemd/sd-journal/catalog.c
const char * const catalog_file_dirs[] = {
"/usr/local/lib/systemd/catalog/",
+--
+2.34.1
+
-From 55d48dd81e57add5b2d4b5a7d697c575a0f37ef5 Mon Sep 17 00:00:00 2001
+From 106b7bd7186c9d6c1dcd72bd4ca6457d3fa72d0b Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 14:18:21 +0800
Subject: [PATCH] src/basic/missing.h: check for missing strndupa
[rebased for systemd 244]
[Rebased for v247]
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
-
---
meson.build | 1 +
src/backlight/backlight.c | 1 +
52 files changed, 63 insertions(+)
diff --git a/meson.build b/meson.build
-index ae53345260..8c8a6c9bdf 100644
+index cb9936ee8b..7ab201c6d9 100644
--- a/meson.build
+++ b/meson.build
@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__secure_getenv']
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index d3bf55acbe..63dd807b8a 100644
+index d054668b8e..9b4caa7651 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
-@@ -11,6 +11,7 @@
+@@ -10,6 +10,7 @@
+ #include "macro.h"
#include "recurse-dir.h"
#include "string-util.h"
- #include "missing_type.h"
+#include "missing_stdlib.h"
#if HAVE_KMOD
#define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
+--
+2.34.1
+