]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
stress-ng: Add missing header files for clock_adjtime
authorKhem Raj <raj.khem@gmail.com>
Mon, 13 Feb 2023 21:04:18 +0000 (13:04 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Feb 2023 10:20:44 +0000 (10:20 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/stress-ng/stress-ng/0001-Include-sys-futex.h-for-clock_adjtime.patch [new file with mode: 0644]
meta/recipes-extended/stress-ng/stress-ng_0.15.03.bb

diff --git a/meta/recipes-extended/stress-ng/stress-ng/0001-Include-sys-futex.h-for-clock_adjtime.patch b/meta/recipes-extended/stress-ng/stress-ng/0001-Include-sys-futex.h-for-clock_adjtime.patch
new file mode 100644 (file)
index 0000000..87d2ead
--- /dev/null
@@ -0,0 +1,32 @@
+From 57f207ec7fb39c8b502f40dbdabd568f6b866a82 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Feb 2023 12:18:08 -0800
+Subject: [PATCH] Include sys/futex.h for clock_adjtime
+
+Fixes
+core-shim.c:1942:9: error: call to undeclared function 'clock_adjtime'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+
+Upstream-Status: Submitted [https://github.com/ColinIanKing/stress-ng/pull/261]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ core-shim.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/core-shim.c b/core-shim.c
+index dc539c64..de38e908 100644
+--- a/core-shim.c
++++ b/core-shim.c
+@@ -66,6 +66,10 @@ UNEXPECTED
+ #include <sys/prctl.h>
+ #endif
++#if defined(HAVE_SYS_TIMEX_H)
++#include <sys/timex.h>
++#endif
++
+ #if defined(HAVE_SYS_RANDOM_H)
+ #include <sys/random.h>
+ #endif
+-- 
+2.39.1
+
index 13a8b49f709055d53278cfb80bf9d6ba5e8a67a3..cd7f41a0165a5de0ff612ff53898f4bfcd6c77f2 100644 (file)
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "git://github.com/ColinIanKing/stress-ng.git;protocol=https;branch=master \
            file://0001-test-float-Make-variables-global.patch \
+           file://0001-Include-sys-futex.h-for-clock_adjtime.patch \
            file://0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch"
 SRCREV = "f3be0447c10fd5652b4c3753d56bcaac13fd8917"
 S = "${WORKDIR}/git"