aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
blob: 1f496dee21576af2816d28ad7cffbdc2f996ff42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Support older hosts with latest util-linux-native

mkostemp is not defined on older machines.  So we detect this and
provide a define that uses mkstemp instead.

O_CLOEXEC is not defined on older machines.  It is however defined
in the 'c.h' header.  Fix up the users to include 'c.h'.

fdisks/fdisksunlabel.c was modified to use qsort_r, however
this is not defined on older hosts.  Revert:
  commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
  fdisk: (sun): use ask API, remove global variable

Upstream-Status: Inappropriate [other]
Patches revert upstream changes in order to support older
machines.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 configure.ac | 1 +
 include/c.h  | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index eb3680b..93e015f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \
 	llseek \
 	lseek64 \
 	mempcpy \
+	mkostemp \
 	nanosleep \
 	open_memstream \
 	personality \
diff --git a/include/c.h b/include/c.h
index e423e8b..cf33b94 100644
--- a/include/c.h
+++ b/include/c.h
@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
 #endif
 
 /*
+ * mkostemp replacement
+ */
+#ifndef HAVE_MKOSTEMP
+#define mkostemp(template, flags) mkstemp(template)
+#endif
+
+/*
  * MAXHOSTNAMELEN replacement
  */
 static inline size_t get_hostname_max(void)
-- 
1.9.1