]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Skip getline() on HP-UX 10.x.
authorDarren Tucker <dtucker@dtucker.net>
Sat, 6 Nov 2021 10:07:03 +0000 (21:07 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Sat, 6 Nov 2021 10:09:48 +0000 (21:09 +1100)
HP-UX 10.x has a getline() implementation in libc that does not behave
as we expect so don't use it.  With correction from Thorsten Glaser and
typo fix from Larkin Nickle.

configure.ac
openbsd-compat/bsd-getline.c

index 57fcc9bcd162e1a1830d80fd9d9ee5e54b34c360..165b391f7885547b08e78b75a74e17846083d3cf 100644 (file)
@@ -765,6 +765,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
                if test -z "$GCC"; then
                        CFLAGS="$CFLAGS -Ae"
                fi
+               AC_DEFINE([BROKEN_GETLINE], [1], [getline is not what we expect])
                ;;
        *-*-hpux11*)
                AC_DEFINE([PAM_SUN_CODEBASE], [1],
index d676f4cefa7e92dd37fa5c21a8c559e886eb4e64..e51bd7a1313db990e2242b0d9621e9a43a15260b 100644 (file)
@@ -39,7 +39,7 @@
 #include "file.h"
 #endif
 
-#if !HAVE_GETLINE
+#if !defined(HAVE_GETLINE) || defined(BROKEN_GETLINE)
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>