From 82c8cd1732ebf89ec144e28b9ff26d8a2260a3e4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 16 Oct 2013 15:25:27 +0200 Subject: heimdal: Fix sss_krb5_get_init_creds_opt_set_canonicalize Heimdal and MIT Kerberos have a different number of arguments for that function. Add a configure compile check and use the appropriate form. --- src/external/krb5.m4 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/external/krb5.m4') diff --git a/src/external/krb5.m4 b/src/external/krb5.m4 index a29056d3..54c5883e 100644 --- a/src/external/krb5.m4 +++ b/src/external/krb5.m4 @@ -69,6 +69,24 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \ krb5_cc_get_full_name \ krb5_free_string \ krb5_xfree]) + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_KRB5_KRB5_H + #include + #else + #include + #endif + ]], + [[ krb5_get_init_creds_opt_set_canonicalize(NULL, 0); ]])], + [AC_DEFINE([KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE_ARGS], [2], [number of arguments])]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_KRB5_KRB5_H + #include + #else + #include + #endif + ]], + [[ krb5_get_init_creds_opt_set_canonicalize(NULL, NULL, 0); ]])], + [AC_DEFINE([KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE_ARGS], [3], [number of arguments])]) + CFLAGS=$SAVE_CFLAGS LIBS=$SAVE_LIBS -- cgit