* [PATCH 1/1] tools/tracing/rtla: fix missing unistd include
@ 2026-06-14 9:28 Andreas Ziegler
2026-06-23 13:12 ` Tomas Glozar
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Ziegler @ 2026-06-14 9:28 UTC (permalink / raw)
To: Steven Rostedt, Tomas Glozar
Cc: linux-trace-kernel, linux-kernel, Andreas Ziegler
Compiling RTLA 7.1-rc6 with GCC 16 and uClibc as standard library fails
with these errors:
src/common.c: In function ‘set_signals’:
src/common.c:40:17: error: implicit declaration of function ‘alarm’ [-Wimplicit-function-declaration]
40 | alarm(params->duration);
| ^~~~~
src/common.c: In function ‘common_apply_config’:
src/common.c:187:44: error: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Wimplicit-function-declaration]
187 | retval = sched_setaffinity(getpid(), sizeof(params->hk_cpu_set),
| ^~~~~~
| getpt
In file included from src/common.c:9:
src/common.c: In function ‘run_tool’:
src/common.c:262:19: error: implicit declaration of function ‘sysconf’; did you mean ‘sscanf’? [-Wimplicit-function-declaration]
262 | nr_cpus = get_nprocs_conf();
| ^~~~~~~~~~~~~~~
src/common.c:262:19: error: ‘_SC_NPROCESSORS_CONF’ undeclared (first use in this function)
262 | nr_cpus = get_nprocs_conf();
| ^~~~~~~~~~~~~~~
src/common.c:262:19: note: each undeclared identifier is reported only once for each function it appears in
src/common.c:370:17: error: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
370 | sleep(1);
| ^~~~~
Restore the missing unistd.h include.
Fixes: <115b06a00875> (tools/rtla: Consolidate nr_cpus usage across all tools)
Signed-off-by: Andreas Ziegler <br025@umbiko.net>
---
tools/tracing/rtla/src/common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/tracing/rtla/src/common.c b/tools/tracing/rtla/src/common.c
index 35e3d3aa922e..5c5398d20f40 100644
--- a/tools/tracing/rtla/src/common.c
+++ b/tools/tracing/rtla/src/common.c
@@ -5,6 +5,7 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <getopt.h>
#include <sys/sysinfo.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] tools/tracing/rtla: fix missing unistd include
2026-06-14 9:28 [PATCH 1/1] tools/tracing/rtla: fix missing unistd include Andreas Ziegler
@ 2026-06-23 13:12 ` Tomas Glozar
2026-06-24 3:33 ` [PATCH v2 1/1] rtla: " Andreas Ziegler
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Glozar @ 2026-06-23 13:12 UTC (permalink / raw)
To: Andreas Ziegler; +Cc: Steven Rostedt, linux-trace-kernel, linux-kernel
Hi Andreas,
Please note that rtla uses "tools/rtla:" or "rtla:" prefix for
patches, not "tools/tracing/rtla".
ne 14. 6. 2026 v 11:35 odesílatel Andreas Ziegler <br025@umbiko.net> napsal:
>
> Compiling RTLA 7.1-rc6 with GCC 16 and uClibc as standard library fails
> with these errors:
>
> ...
>
> Restore the missing unistd.h include.
>
Thanks for the fix, I missed that.
Indeed, according to POSIX, alarm() has to include unistd.h. I'll try
to add the uclibc build to my tests.
> Fixes: <115b06a00875> (tools/rtla: Consolidate nr_cpus usage across all tools)
>
The conventional syntax for Fixes is:
Fixes: 115b06a00875 ("tools/rtla: Consolidate nr_cpus usage across all tools")
i.e. no angle brackets, and double quotes around the commit name. See:
https://docs.kernel.org/process/submitting-patches.html#describe-changes
> Signed-off-by: Andreas Ziegler <br025@umbiko.net>
> ---
> tools/tracing/rtla/src/common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/tracing/rtla/src/common.c b/tools/tracing/rtla/src/common.c
> index 35e3d3aa922e..5c5398d20f40 100644
> --- a/tools/tracing/rtla/src/common.c
> +++ b/tools/tracing/rtla/src/common.c
> @@ -5,6 +5,7 @@
> #include <signal.h>
> #include <stdlib.h>
> #include <string.h>
> +#include <unistd.h>
> #include <getopt.h>
The getopt.h include was removed in master, causing a conflict when
applying the patch. Could you please rebase?
> #include <sys/sysinfo.h>
>
> --
> 2.53.0
>
Thanks,
Tomas
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v2 1/1] rtla: fix missing unistd include
2026-06-23 13:12 ` Tomas Glozar
@ 2026-06-24 3:33 ` Andreas Ziegler
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Ziegler @ 2026-06-24 3:33 UTC (permalink / raw)
To: Tomas Glozar
Cc: Steven Rostedt, linux-trace-kernel, linux-kernel, Andreas Ziegler
Compiling RTLA 7.1.x with GCC 16 and uClibc as standard library fails
with these errors:
src/common.c: In function ‘set_signals’:
src/common.c:40:17: error: implicit declaration of function ‘alarm’ [-Wimplicit-function-declaration]
40 | alarm(params->duration);
| ^~~~~
src/common.c: In function ‘common_apply_config’:
src/common.c:187:44: error: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Wimplicit-function-declaration]
187 | retval = sched_setaffinity(getpid(), sizeof(params->hk_cpu_set),
| ^~~~~~
| getpt
In file included from src/common.c:9:
src/common.c: In function ‘run_tool’:
src/common.c:262:19: error: implicit declaration of function ‘sysconf’; did you mean ‘sscanf’? [-Wimplicit-function-declaration]
262 | nr_cpus = get_nprocs_conf();
| ^~~~~~~~~~~~~~~
src/common.c:262:19: error: ‘_SC_NPROCESSORS_CONF’ undeclared (first use in this function)
262 | nr_cpus = get_nprocs_conf();
| ^~~~~~~~~~~~~~~
src/common.c:262:19: note: each undeclared identifier is reported only once for each function it appears in
src/common.c:370:17: error: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
370 | sleep(1);
| ^~~~~
Restore the missing unistd.h include.
Fixes: 115b06a00875 ("tools/rtla: Consolidate nr_cpus usage across all tools")
Signed-off-by: Andreas Ziegler <br025@umbiko.net>
---
Changes v1 -> v2:
adapt commit message
correct fixes: formatting
rebase on current master (502d801f0ab0)
tools/tracing/rtla/src/common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/tracing/rtla/src/common.c b/tools/tracing/rtla/src/common.c
index d0a8a6edbf0c..8c7f5e75b2ec 100644
--- a/tools/tracing/rtla/src/common.c
+++ b/tools/tracing/rtla/src/common.c
@@ -5,6 +5,7 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/sysinfo.h>
#include "common.h"
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-24 3:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 9:28 [PATCH 1/1] tools/tracing/rtla: fix missing unistd include Andreas Ziegler
2026-06-23 13:12 ` Tomas Glozar
2026-06-24 3:33 ` [PATCH v2 1/1] rtla: " Andreas Ziegler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox