arsv / perl-cross

configure and cross-compile perl
Other
81 stars 29 forks source link

configure_func.sh: Add _GNU_SOURCE define and function signatures #137

Closed kraj closed 2 years ago

kraj commented 2 years ago

Modern compilers are getting stricter about include paths and function signature being known duting compilation e.g. clang-15 now errors out if a function signature is not found

try.c:1:18: error: call to undeclared function 'getspnam'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

This causes the test of function to fail even though the function is available in libc. Therefore try to add proper include headers which define these functions and also define _GNU_SOURCE in every test since some of GNU/Linux funtions e.g. accept4 are guarged by this define

Upstream-Status: Pending Signed-off-by: Khem Raj raj.khem@gmail.com

arsv commented 2 years ago

Merged.