safe_macros: Move safe_get/setpgid() to C source
Fixes numerous "implicit function declaration" warnings (for all sources
that include the header) on slightly older distributions since
get/setpgid() required either _XOPEN_SOURCE or _GNU_SOURCE on older
glibc.
Note that defining _GNU_SOURCE in the tst_safe_macros.h is not a
solution since it has to be defined before any libc headers are
included.
So this commit adds tst_safe_macros.c that defines _GNU_SOURCE and puts
these two functions there.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
2 files changed