blob: 1f496dee21576af2816d28ad7cffbdc2f996ff42 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Support older hosts with latest util-linux-native
2
3mkostemp is not defined on older machines. So we detect this and
4provide a define that uses mkstemp instead.
5
6O_CLOEXEC is not defined on older machines. It is however defined
7in the 'c.h' header. Fix up the users to include 'c.h'.
8
9fdisks/fdisksunlabel.c was modified to use qsort_r, however
10this is not defined on older hosts. Revert:
11 commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
12 fdisk: (sun): use ask API, remove global variable
13
14Upstream-Status: Inappropriate [other]
15Patches revert upstream changes in order to support older
16machines.
17
18Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20---
21 configure.ac | 1 +
22 include/c.h | 7 +++++++
23 2 files changed, 8 insertions(+)
24
25diff --git a/configure.ac b/configure.ac
26index eb3680b..93e015f 100644
27--- a/configure.ac
28+++ b/configure.ac
29@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \
30 llseek \
31 lseek64 \
32 mempcpy \
33+ mkostemp \
34 nanosleep \
35 open_memstream \
36 personality \
37diff --git a/include/c.h b/include/c.h
38index e423e8b..cf33b94 100644
39--- a/include/c.h
40+++ b/include/c.h
41@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
42 #endif
43
44 /*
45+ * mkostemp replacement
46+ */
47+#ifndef HAVE_MKOSTEMP
48+#define mkostemp(template, flags) mkstemp(template)
49+#endif
50+
51+/*
52 * MAXHOSTNAMELEN replacement
53 */
54 static inline size_t get_hostname_max(void)
55--
561.9.1
57