2014-03-24 00:19:44 +00:00
|
|
|
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>
|
2014-11-30 22:11:09 +00:00
|
|
|
---
|
2014-03-24 00:19:44 +00:00
|
|
|
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2014-11-30 22:11:09 +00:00
|
|
|
@@ -315,6 +315,7 @@ AC_CHECK_FUNCS([ \
|
2014-03-24 00:19:44 +00:00
|
|
|
llseek \
|
|
|
|
lseek64 \
|
|
|
|
mempcpy \
|
|
|
|
+ mkostemp \
|
|
|
|
nanosleep \
|
2014-11-30 22:11:09 +00:00
|
|
|
open_memstream \
|
2014-03-24 00:19:44 +00:00
|
|
|
personality \
|
|
|
|
--- a/include/c.h
|
|
|
|
+++ b/include/c.h
|
2014-11-30 22:11:09 +00:00
|
|
|
@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
|
2014-03-24 00:19:44 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
+ * mkostemp replacement
|
|
|
|
+ */
|
|
|
|
+#ifndef HAVE_MKOSTEMP
|
|
|
|
+#define mkostemp(template, flags) mkstemp(template)
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
* MAXHOSTNAMELEN replacement
|
|
|
|
*/
|
|
|
|
static inline size_t get_hostname_max(void)
|