1 Support older hosts with latest util-linux-native
3 mkostemp is not defined on older machines. So we detect this and
4 provide a define that uses mkstemp instead.
6 O_CLOEXEC is not defined on older machines. It is however defined
7 in the 'c.h' header. Fix up the users to include 'c.h'.
9 fdisks/fdisksunlabel.c was modified to use qsort_r, however
10 this is not defined on older hosts. Revert:
11 commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
12 fdisk: (sun): use ask API, remove global variable
14 Upstream-Status: Inappropriate [other]
15 Patches revert upstream changes in order to support older
18 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
22 @@ -299,6 +299,7 @@ AC_CHECK_FUNCS([ \
32 @@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
36 + * mkostemp replacement
38 +#ifndef HAVE_MKOSTEMP
39 +#define mkostemp(template, flags) mkstemp(template)
43 * MAXHOSTNAMELEN replacement
45 static inline size_t get_hostname_max(void)
49 #include <sys/syscall.h>
51 #include "randutils.h"
55 #define THREAD_LOCAL static __thread
61 #include "wholedisk.h"
64 int is_whole_disk_fd(int fd, const char *name)