[LTP] [PATCH v3 1/4] include: tst_clone.h: Fix possible MUSL build failures
Petr Vorel
pvorel@suse.cz
Tue Sep 3 09:46:02 CEST 2024
Hi Cyril,
> The problem is that on musl sched.h exposes clone() when _GNU_SOURCE is
> defined and at the same time sched.h does not get pulled before
> tst_clone.h gets included, which means that the macro from tst_clone.h
> that rewrites clone() functions actually rewrites the function
> declaration in the system header.
BTW glibc guards clone() with #ifdef __USE_GNU, which should have the same
effect as _GNU_SOURCE. I wonder why only musl got broken.
> We remove the tst_clone.h from the old library because the newly
> included sched.h causes conflicts in the cpuset/cpuset_lib/ directory
> and the tst_clone.h header is used only in a single old library test
> i.e. clone02.c.
> This commit is needed in order to avoid build failures in the next
> commits that add support for the shell test library.
Thanks for fixing this!
Reported-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
More information about the ltp
mailing list