summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/stress-ng/stress-ng/0001-Include-sys-futex.h-for-clock_adjtime.patch
blob: 87d2ead46ab0d9b1e45e2428e4adaf5f5a893484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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