From 5528286147492aafa8740c09db63290042b79cb0 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 3 Jan 2012 09:15:17 +0100 Subject: [PATCH] rt-tests: fix build issues on uClibc Signed-off-by: Peter Korsgaard --- package/rt-tests/rt-tests-uclibc.patch | 103 +++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 package/rt-tests/rt-tests-uclibc.patch diff --git a/package/rt-tests/rt-tests-uclibc.patch b/package/rt-tests/rt-tests-uclibc.patch new file mode 100644 index 0000000000..b8e1ac5a2f --- /dev/null +++ b/package/rt-tests/rt-tests-uclibc.patch @@ -0,0 +1,103 @@ +[PATCH] fix build with uClibc + +Fix two build issues with (modern) uClibc: +- uClibc has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME, + conflicting with emulation function +- uClibc doesn't provide utmpx.h if not built with UCLIBC_HAS_UTMPX, which + is included in several files (but not needed). + +Signed-off-by: Peter Korsgaard +--- + src/backfire/sendme.c | 1 - + src/cyclictest/cyclictest.c | 3 ++- + src/pmqtest/pmqtest.c | 1 - + src/ptsematest/ptsematest.c | 1 - + src/sigwaittest/sigwaittest.c | 2 -- + src/svsematest/svsematest.c | 1 - + 6 files changed, 2 insertions(+), 7 deletions(-) + +Index: rt-tests-0.83/src/backfire/sendme.c +=================================================================== +--- rt-tests-0.83.orig/src/backfire/sendme.c ++++ rt-tests-0.83/src/backfire/sendme.c +@@ -32,7 +32,6 @@ + #include "rt-utils.h" + #include "rt-get_cpu.h" + +-#include + #include + #include + #include +Index: rt-tests-0.83/src/cyclictest/cyclictest.c +=================================================================== +--- rt-tests-0.83.orig/src/cyclictest/cyclictest.c ++++ rt-tests-0.83/src/cyclictest/cyclictest.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -53,7 +54,7 @@ + #define gettid() syscall(__NR_gettid) + #define sigev_notify_thread_id _sigev_un._tid + +-#ifdef __UCLIBC__ ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__) + #define MAKE_PROCESS_CPUCLOCK(pid, clock) \ + ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) + #define CPUCLOCK_SCHED 2 +Index: rt-tests-0.83/src/pmqtest/pmqtest.c +=================================================================== +--- rt-tests-0.83.orig/src/pmqtest/pmqtest.c ++++ rt-tests-0.83/src/pmqtest/pmqtest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include "rt-utils.h" + #include "rt-get_cpu.h" +Index: rt-tests-0.83/src/ptsematest/ptsematest.c +=================================================================== +--- rt-tests-0.83.orig/src/ptsematest/ptsematest.c ++++ rt-tests-0.83/src/ptsematest/ptsematest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + +Index: rt-tests-0.83/src/sigwaittest/sigwaittest.c +=================================================================== +--- rt-tests-0.83.orig/src/sigwaittest/sigwaittest.c ++++ rt-tests-0.83/src/sigwaittest/sigwaittest.c +@@ -31,11 +31,9 @@ + #include + #include + #include +-#include + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + +Index: rt-tests-0.83/src/svsematest/svsematest.c +=================================================================== +--- rt-tests-0.83.orig/src/svsematest/svsematest.c ++++ rt-tests-0.83/src/svsematest/svsematest.c +@@ -31,7 +31,6 @@ + #include + #include + #include +-#include + + #include + -- 2.30.2