summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/external/krb5.m41
-rw-r--r--src/tests/krb5_child-test.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/external/krb5.m4 b/src/external/krb5.m4
index b87ec5c8..474cb37c 100644
--- a/src/external/krb5.m4
+++ b/src/external/krb5.m4
@@ -58,6 +58,7 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
krb5_get_time_offsets \
krb5_principal_get_realm \
krb5_cc_cache_match \
+ krb5_timestamp_to_sfstring \
krb5_cc_get_full_name])
CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 636f7336..760b9586 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -315,11 +315,15 @@ printtime(krb5_timestamp ts)
char timestring[BUFSIZ];
char fill = '\0';
+#ifdef HAVE_KRB5_TIMESTAMP_TO_SFSTRING
kret = krb5_timestamp_to_sfstring(ts, timestring, BUFSIZ, &fill);
if (kret) {
KRB5_CHILD_TEST_DEBUG(SSSDBG_OP_FAILURE, kret);
}
printf("%s", timestring);
+#else
+ printf("%s", ctime(&ts));
+#endif /* HAVE_KRB5_TIMESTAMP_TO_SFSTRING */
}
static void