summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux/util-linux-native.patch')
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
new file mode 100644
index 0000000..afe543c
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
@@ -0,0 +1,73 @@
1Support 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>
19
20Index: util-linux-2.24.1/configure.ac
21===================================================================
22--- util-linux-2.24.1.orig/configure.ac
23+++ util-linux-2.24.1/configure.ac
24@@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \
25 llseek \
26 lseek64 \
27 mempcpy \
28+ mkostemp \
29 nanosleep \
30 personality \
31 posix_fadvise \
32Index: util-linux-2.24.1/include/c.h
33===================================================================
34--- util-linux-2.24.1.orig/include/c.h
35+++ util-linux-2.24.1/include/c.h
36@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
37 #endif
38
39 /*
40+ * mkostemp replacement
41+ */
42+#ifndef HAVE_MKOSTEMP
43+#define mkostemp(template, flags) mkstemp(template)
44+#endif
45+
46+/*
47 * MAXHOSTNAMELEN replacement
48 */
49 static inline size_t get_hostname_max(void)
50Index: util-linux-2.24.1/lib/randutils.c
51===================================================================
52--- util-linux-2.24.1.orig/lib/randutils.c
53+++ util-linux-2.24.1/lib/randutils.c
54@@ -16,6 +16,7 @@
55 #include <sys/syscall.h>
56
57 #include "randutils.h"
58+#include "c.h"
59
60 #ifdef HAVE_TLS
61 #define THREAD_LOCAL static __thread
62Index: util-linux-2.24.1/lib/wholedisk.c
63===================================================================
64--- util-linux-2.24.1.orig/lib/wholedisk.c
65+++ util-linux-2.24.1/lib/wholedisk.c
66@@ -10,6 +10,7 @@
67
68 #include "blkdev.h"
69 #include "wholedisk.h"
70+#include "c.h"
71
72 int is_whole_disk_fd(int fd, const char *name)
73 {