Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 045f205fd21e5e380edf813de04fcfbf5a487219 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 2 Jul 2018 13:28:25 +0800 |
| 4 | Subject: [PATCH 11/19] src/basic/missing.h: check for missing __compar_fn_t |
| 5 | typedef |
| 6 | |
| 7 | include missing.h for missing __compar_fn_t |
| 8 | |
| 9 | Upstream-Status: Inappropriate [musl specific] |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 13 | --- |
| 14 | src/basic/missing.h | 5 +++++ |
| 15 | src/basic/strbuf.c | 1 + |
| 16 | 2 files changed, 6 insertions(+) |
| 17 | |
| 18 | diff --git a/src/basic/missing.h b/src/basic/missing.h |
| 19 | index 6dc750eba..cd1cc109f 100644 |
| 20 | --- a/src/basic/missing.h |
| 21 | +++ b/src/basic/missing.h |
| 22 | @@ -1179,6 +1179,11 @@ struct input_mask { |
| 23 | #define RENAME_NOREPLACE (1 << 0) |
| 24 | #endif |
| 25 | |
| 26 | +#ifndef __COMPAR_FN_T |
| 27 | +#define __COMPAR_FN_T |
| 28 | +typedef int (*__compar_fn_t)(const void *, const void *); |
| 29 | +#endif |
| 30 | + |
| 31 | #ifndef KCMP_FILE |
| 32 | #define KCMP_FILE 0 |
| 33 | #endif |
| 34 | diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c |
| 35 | index e2ed776a0..4d3ebec4c 100644 |
| 36 | --- a/src/basic/strbuf.c |
| 37 | +++ b/src/basic/strbuf.c |
| 38 | @@ -7,6 +7,7 @@ |
| 39 | #include "alloc-util.h" |
| 40 | #include "strbuf.h" |
| 41 | #include "util.h" |
| 42 | +#include "missing.h" |
| 43 | |
| 44 | /* |
| 45 | * Strbuf stores given strings in a single continuous allocated memory |
| 46 | -- |
| 47 | 2.11.0 |
| 48 | |