jbeverly / pam_ssh_agent_auth

Moving pam_ssh_agent_auth to github as primary development location
Other
98 stars 27 forks source link

Build blows up because userauth_pubkey_from_pam.c forgot an include #46

Open Artoria2e5 opened 7 months ago

Artoria2e5 commented 7 months ago

On Darwin 22.6.0 (macOS 13.6.1), Apple clang 15.0.0, running configure -C --without-openssl-header-check; make` (and with appropriate CFLAG workaround for issue 45) on git HEAD gets:

gcc -g -O2 -fPIC -Wall -Wpointer-arith -Wuninitialized -Wno-error=all -fstack-protector-all -fno-common  -I. -I.  -I/usr/local/opt/icu4c/include -I/usr/local/opt/ruby/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/gettext/include -I/usr/local/opt/qt/include  -DHAVE_CONFIG_H -c userauth_pubkey_from_pam.c -o userauth_pubkey_from_pam.o
In file included from userauth_pubkey_from_pam.c:36:
./key.h:80:1: error: unknown type name 'u_char'; did you mean 'char'?
u_char          *pamsshagentauth_key_fingerprint_raw(const Key *, enum fp_type, u_int *);
^~~~~~
char

The other files that include key.h, like ssh-dss.c compile alright.

Guesses on why

configure attempts to set HAVE_U_INT by

AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
    AC_TRY_COMPILE(
        [ #include <sys/types.h> ],
        [ u_int a; a = 1;],
        [ ac_cv_have_u_int="yes" ],
        [ ac_cv_have_u_int="no" ]
    )
])

However... oh, there's just no reference to #include <sys/types.h> anywhere in the include chain for that file.