Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From efc57856f961c1f3bf016c511c53d990db8abdff Mon Sep 17 00:00:00 2001 |
| 2 | From: Emil Renner Berthing <systemd@esmil.dk> |
| 3 | Date: Mon, 23 Oct 2017 11:31:03 -0700 |
| 4 | Subject: [PATCH 16/31] 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: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | src/basic/missing.h | 5 +++++ |
| 14 | src/basic/strbuf.c | 1 + |
| 15 | 2 files changed, 6 insertions(+) |
| 16 | |
| 17 | diff --git a/src/basic/missing.h b/src/basic/missing.h |
| 18 | index 07a8c8364..1aee3346a 100644 |
| 19 | --- a/src/basic/missing.h |
| 20 | +++ b/src/basic/missing.h |
| 21 | @@ -1162,6 +1162,11 @@ struct input_mask { |
| 22 | #define RENAME_NOREPLACE (1 << 0) |
| 23 | #endif |
| 24 | |
| 25 | +#ifndef __COMPAR_FN_T |
| 26 | +#define __COMPAR_FN_T |
| 27 | +typedef int (*__compar_fn_t)(const void *, const void *); |
| 28 | +#endif |
| 29 | + |
| 30 | #ifndef KCMP_FILE |
| 31 | #define KCMP_FILE 0 |
| 32 | #endif |
| 33 | diff --git a/src/basic/strbuf.c b/src/basic/strbuf.c |
| 34 | index 8befffa66..bcb860f95 100644 |
| 35 | --- a/src/basic/strbuf.c |
| 36 | +++ b/src/basic/strbuf.c |
| 37 | @@ -24,6 +24,7 @@ |
| 38 | |
| 39 | #include "alloc-util.h" |
| 40 | #include "strbuf.h" |
| 41 | +#include "missing.h" |
| 42 | |
| 43 | /* |
| 44 | * Strbuf stores given strings in a single continuous allocated memory |
| 45 | -- |
| 46 | 2.13.0 |
| 47 | |