fix build error
This commit is contained in:
parent
72d68b7bc7
commit
030854f301
|
@ -0,0 +1,63 @@
|
||||||
|
From eb50b6d936c474f5bc2974c059f6432222af4de4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <k...@redhat.com>
|
||||||
|
Date: Thu, 22 Mar 2018 12:50:45 +0100
|
||||||
|
Subject: [PATCH] Fix linux/fs.h and sys/mount.h collisions
|
||||||
|
|
||||||
|
* (kernel-headers) linux/fs.h and (glibc) sys/mount.h contains MS_* constants
|
||||||
|
and because it's without #ifdefs you cannot include the both files together
|
||||||
|
in the same code
|
||||||
|
|
||||||
|
* (systemd) src/basic/missing.h contains another copy of MS_* constants
|
||||||
|
|
||||||
|
The patch removes local systemd MS_* fallbacks, cleanup fs.h and
|
||||||
|
mount.h include.
|
||||||
|
|
||||||
|
Signed-off-by: Karel Zak <k...@redhat.com>
|
||||||
|
---
|
||||||
|
src/basic/missing.h | 40 ----------------------------------------
|
||||||
|
1 files changed, 0 insertions(+), 40 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/basic/missing.h b/src/basic/missing.h
|
||||||
|
index 567aea8da9c..6802dd27c7b 100644
|
||||||
|
--- a/src/basic/missing.h
|
||||||
|
+++ b/src/basic/missing.h
|
||||||
|
@@ -520,13 +520,9 @@ struct btrfs_ioctl_quota_ctl_args {
|
||||||
|
#define TMPFS_MAGIC 0x01021994
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifndef MS_MOVE
|
||||||
|
-#define MS_MOVE 8192
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
-#ifndef MS_PRIVATE
|
||||||
|
-#define MS_PRIVATE (1 << 18)
|
||||||
|
-#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
|
||||||
|
#if !HAVE_DECL_GETTID
|
||||||
|
static inline pid_t gettid(void) {
|
||||||
|
@@ -538,17 +534,11 @@ static inline pid_t gettid(void) {
|
||||||
|
#define SCM_SECURITY 0x03
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifndef MS_STRICTATIME
|
||||||
|
-#define MS_STRICTATIME (1<<24)
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
-#ifndef MS_REC
|
||||||
|
-#define MS_REC 16384
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
-#ifndef MS_SHARED
|
||||||
|
-#define MS_SHARED (1<<20)
|
||||||
|
-#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
|
||||||
|
#ifndef PR_SET_NO_NEW_PRIVS
|
||||||
|
#define PR_SET_NO_NEW_PRIVS 38
|
||||||
|
================================================================
|
||||||
|
|
||||||
|
--- gitweb:
|
|
@ -56,6 +56,7 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
|
||||||
file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
|
file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
|
||||||
file://0023-build-sys-fix-build-with-libgrcypt-disabled.patch \
|
file://0023-build-sys-fix-build-with-libgrcypt-disabled.patch \
|
||||||
file://0024-patch-for-mount-usrdata.patch \
|
file://0024-patch-for-mount-usrdata.patch \
|
||||||
|
file://0025-fix_missing_define.patch \
|
||||||
"
|
"
|
||||||
SRC_URI_append_libc-uclibc = "\
|
SRC_URI_append_libc-uclibc = "\
|
||||||
file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
|
file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
Ptest needs buildtest-TESTS and runtest-TESTS targets.
|
|
||||||
serial-tests is required to generate those targets.
|
|
||||||
Revert run.sh script accordingly to serialize running tests
|
|
||||||
|
|
||||||
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
|
|
||||||
Upstream-Status: Inappropriate
|
|
||||||
|
|
||||||
diff -ruN a/configure.ac b/configure.ac
|
|
||||||
--- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
|
|
||||||
+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
|
|
||||||
@@ -10,7 +10,7 @@
|
|
||||||
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
|
|
||||||
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
|
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
|
||||||
-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
|
|
||||||
+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
|
|
||||||
|
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
|
||||||
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
|
|
|
@ -1,23 +0,0 @@
|
||||||
util-linux: take ${sbindir} from the environment if it is set there
|
|
||||||
fix the test, the [ ] syntax was getting eaten by autoconf
|
|
||||||
|
|
||||||
Signed-off-by: Phil Blundell <pb@pbcl.net>
|
|
||||||
Signed-off-by: Saul Wold <sgw@linux.intel.com
|
|
||||||
Upstream-Status: Inappropriate [configuration]
|
|
||||||
|
|
||||||
Index: util-linux-2.22.1/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- util-linux-2.22.1.orig/configure.ac
|
|
||||||
+++ util-linux-2.22.1/configure.ac
|
|
||||||
@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
|
|
||||||
usrbin_execdir='${exec_prefix}/bin'
|
|
||||||
AC_SUBST([usrbin_execdir])
|
|
||||||
|
|
||||||
-usrsbin_execdir='${exec_prefix}/sbin'
|
|
||||||
+if test -z "$usrsbin_execdir" ;
|
|
||||||
+then
|
|
||||||
+ usrsbin_execdir='${exec_prefix}/sbin'
|
|
||||||
+fi
|
|
||||||
AC_SUBST([usrsbin_execdir])
|
|
||||||
|
|
||||||
case $libdir in
|
|
|
@ -1,25 +0,0 @@
|
||||||
Display testname for subtest
|
|
||||||
|
|
||||||
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/functions.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tests/functions.sh b/tests/functions.sh
|
|
||||||
index 5246605..b24dc15 100644
|
|
||||||
--- a/tests/functions.sh
|
|
||||||
+++ b/tests/functions.sh
|
|
||||||
@@ -320,7 +320,7 @@ function ts_init_subtest {
|
|
||||||
|
|
||||||
if [ "$TS_PARSABLE" != "yes" ]; then
|
|
||||||
[ $TS_NSUBTESTS -eq 1 ] && echo
|
|
||||||
- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
|
|
||||||
+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.8.3
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
Define TESTS variable
|
|
||||||
|
|
||||||
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
|
|
||||||
Upstream-Status: Pending
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index bbaccb1..7d5a6bb 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -48,6 +48,7 @@ systemdsystemunit_DATA =
|
|
||||||
dist_bashcompletion_DATA =
|
|
||||||
check_PROGRAMS =
|
|
||||||
dist_check_SCRIPTS =
|
|
||||||
+TESTS = $(check_PROGRAMS)
|
|
||||||
|
|
||||||
PATHFILES =
|
|
||||||
|
|
||||||
--
|
|
||||||
2.8.3
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cd tests || exit 1
|
|
||||||
|
|
||||||
comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "-------------------- util-linux regression tests --------------------"
|
|
||||||
echo
|
|
||||||
echo " For development purpose only. "
|
|
||||||
echo " Don't execute on production system! "
|
|
||||||
echo
|
|
||||||
|
|
||||||
res=0
|
|
||||||
count=0
|
|
||||||
for ts in $comps;
|
|
||||||
do
|
|
||||||
$ts | sed '{
|
|
||||||
s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
|
|
||||||
s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
|
|
||||||
s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
|
|
||||||
}'
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
auth include runuser
|
|
||||||
session optional pam_keyinit.so force revoke
|
|
||||||
session include runuser
|
|
|
@ -1,4 +0,0 @@
|
||||||
auth sufficient pam_rootok.so
|
|
||||||
session optional pam_keyinit.so revoke
|
|
||||||
session required pam_limits.so
|
|
||||||
session required pam_unix.so
|
|
|
@ -1,33 +0,0 @@
|
||||||
From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robert Yang <liezhi.yang@windriver.com>
|
|
||||||
Date: Wed, 26 Mar 2014 01:30:29 +0000
|
|
||||||
Subject: [PATCH] sun.c: use qsort() to instead of qsort_r()
|
|
||||||
|
|
||||||
qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
|
|
||||||
the host like CentOS 5.x.
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [Other]
|
|
||||||
|
|
||||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
||||||
---
|
|
||||||
libfdisk/src/sun.c | 5 ++---
|
|
||||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
Index: util-linux-2.24.2/libfdisk/src/sun.c
|
|
||||||
===================================================================
|
|
||||||
--- util-linux-2.24.2.orig/libfdisk/src/sun.c
|
|
||||||
+++ util-linux-2.24.2/libfdisk/src/sun.c
|
|
||||||
@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f
|
|
||||||
}
|
|
||||||
verify_sun_starts = starts;
|
|
||||||
|
|
||||||
- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
|
|
||||||
- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
|
|
||||||
- verify_sun_starts);
|
|
||||||
-
|
|
||||||
+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
|
|
||||||
+ (int (*)(const void *,const void *)) verify_sun_cmp);
|
|
||||||
+
|
|
||||||
if (array[0] == -1) {
|
|
||||||
fdisk_info(cxt, _("No partitions defined."));
|
|
||||||
return 0;
|
|
|
@ -1,99 +0,0 @@
|
||||||
This patch adds error() API implementation for non-glibc system C libs
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
misc-utils/test_uuidd.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 61 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c
|
|
||||||
index 36f3b3d..7d579ce 100644
|
|
||||||
--- a/misc-utils/test_uuidd.c
|
|
||||||
+++ b/misc-utils/test_uuidd.c
|
|
||||||
@@ -23,7 +23,6 @@
|
|
||||||
*
|
|
||||||
* make uuidd uuidgen localstatedir=/var
|
|
||||||
*/
|
|
||||||
-#include <error.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
@@ -38,6 +37,17 @@
|
|
||||||
#include "xalloc.h"
|
|
||||||
#include "strutils.h"
|
|
||||||
|
|
||||||
+#ifdef __GLIBC__
|
|
||||||
+#include <error.h>
|
|
||||||
+#else
|
|
||||||
+extern void (*error_print_progname)(void);
|
|
||||||
+extern unsigned int error_message_count;
|
|
||||||
+extern int error_one_per_line;
|
|
||||||
+
|
|
||||||
+void error(int, int, const char *, ...);
|
|
||||||
+void error_at_line(int, int, const char *, unsigned int, const char *, ...);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#define LOG(level,args) if (loglev >= level) { fprintf args; }
|
|
||||||
|
|
||||||
size_t nprocesses = 4;
|
|
||||||
@@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj)
|
|
||||||
fprintf(stderr, "}\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+extern char *__progname;
|
|
||||||
+
|
|
||||||
+void (*error_print_progname)(void) = 0;
|
|
||||||
+unsigned int error_message_count = 0;
|
|
||||||
+int error_one_per_line = 0;
|
|
||||||
+
|
|
||||||
+static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
|
|
||||||
+{
|
|
||||||
+ if (file && error_one_per_line) {
|
|
||||||
+ static const char *oldfile;
|
|
||||||
+ static unsigned int oldline;
|
|
||||||
+ if (line == oldline && strcmp(file, oldfile) == 0)
|
|
||||||
+ return;
|
|
||||||
+ oldfile = file;
|
|
||||||
+ oldline = line;
|
|
||||||
+ }
|
|
||||||
+ if (error_print_progname)
|
|
||||||
+ error_print_progname();
|
|
||||||
+ else
|
|
||||||
+ fprintf(stderr, "%s: ", __progname);
|
|
||||||
+ if (file)
|
|
||||||
+ fprintf(stderr, "%s:%u: ", file, line);
|
|
||||||
+ vfprintf(stderr, fmt, ap);
|
|
||||||
+ if (e)
|
|
||||||
+ fprintf(stderr, ": %s", strerror(e));
|
|
||||||
+ putc('\n', stderr);
|
|
||||||
+ fflush(stderr);
|
|
||||||
+ error_message_count++;
|
|
||||||
+ if (status)
|
|
||||||
+ exit(status);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void error(int status, int e, const char *fmt, ...)
|
|
||||||
+{
|
|
||||||
+ va_list ap;
|
|
||||||
+ va_start(ap,fmt);
|
|
||||||
+ eprint(status, e, 0, 0, fmt, ap);
|
|
||||||
+ va_end(ap);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...)
|
|
||||||
+{
|
|
||||||
+ va_list ap;
|
|
||||||
+ va_start(ap,fmt);
|
|
||||||
+ eprint(status, e, file, line, fmt, ap);
|
|
||||||
+ va_end(ap);
|
|
||||||
+}
|
|
||||||
+#endif /* __GLIBC__ */
|
|
||||||
+
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
size_t i, nfailed = 0, nignored = 0;
|
|
||||||
--
|
|
||||||
2.8.3
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ do_install_append() {
|
||||||
|
|
||||||
# Delete files already provided by util-linux
|
# Delete files already provided by util-linux
|
||||||
local i
|
local i
|
||||||
for i in mount umount; do
|
for i in mount umount rfkill; do
|
||||||
rm ${D}${datadir}/${BPN}/completions/$i
|
rm ${D}${datadir}/${BPN}/completions/$i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue