meta-digi: fix build util-linux-native on older hosts
The build was failing in our Jenkins server (Debian 6) with: error: 'MS_PRIVATE' undeclared error: 'MS_REC' undeclared Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
87f306a0d5
commit
240ed81349
|
|
@ -0,0 +1,74 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Fri, 14 Mar 2014 17:25:22 +0100
|
||||
Subject: [PATCH] util-linux-native
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
include/c.h | 15 +++++++++++++++
|
||||
lib/randutils.c | 1 +
|
||||
lib/wholedisk.c | 1 +
|
||||
4 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 23059698f1bb..ec0fa9246427 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \
|
||||
llseek \
|
||||
lseek64 \
|
||||
mempcpy \
|
||||
+ mkostemp \
|
||||
nanosleep \
|
||||
personality \
|
||||
posix_fadvise \
|
||||
diff --git a/include/c.h b/include/c.h
|
||||
index 4a9bf3d42e5e..331f25d35c06 100644
|
||||
--- a/include/c.h
|
||||
+++ b/include/c.h
|
||||
@@ -235,6 +235,21 @@ static inline int dirfd(DIR *d)
|
||||
#define IUTF8 0040000
|
||||
#endif
|
||||
|
||||
+#ifndef MS_PRIVATE
|
||||
+#define MS_PRIVATE (1 << 18)
|
||||
+#endif
|
||||
+
|
||||
+#ifndef MS_REC
|
||||
+#define MS_REC 16384
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * mkostemp replacement
|
||||
+ */
|
||||
+#ifndef HAVE_MKOSTEMP
|
||||
+#define mkostemp(template, flags) mkstemp(template)
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* MAXHOSTNAMELEN replacement
|
||||
*/
|
||||
diff --git a/lib/randutils.c b/lib/randutils.c
|
||||
index ed79aad920fe..f2cc0754e84f 100644
|
||||
--- a/lib/randutils.c
|
||||
+++ b/lib/randutils.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include "randutils.h"
|
||||
+#include "c.h"
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
#define THREAD_LOCAL static __thread
|
||||
diff --git a/lib/wholedisk.c b/lib/wholedisk.c
|
||||
index 5161a1e98ef5..3210de6ac26f 100644
|
||||
--- a/lib/wholedisk.c
|
||||
+++ b/lib/wholedisk.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "blkdev.h"
|
||||
#include "wholedisk.h"
|
||||
+#include "c.h"
|
||||
|
||||
int is_whole_disk_fd(int fd, const char *name)
|
||||
{
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright (C) 2014 Digi International.
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
Loading…
Reference in New Issue