grantpt, unlockpt, and ptsname are not available by default. They need the feature test macro _XOPEN_SOURCE >= 500 to be visible. In its absence, a cmake check fails when libptytty is compiled as C99 - where implicit function declarations are not allowed. This patch fixes that.
Signed-off-by: Arjun Shankar <[email protected]> --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b4e969..f4cae83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,8 @@ check_function_exists(setreuid HAVE_SETREUID) check_function_exists(setresuid HAVE_SETRESUID) check_c_source_compiles( - "#include <stdlib.h> + "#define _XOPEN_SOURCE 500 + #include <stdlib.h> int main () { -- 2.40.0 _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/rxvt-unicode
