diff options
Diffstat (limited to 'src/lib/krb5/krb5_libinit.c')
-rw-r--r-- | src/lib/krb5/krb5_libinit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/krb5/krb5_libinit.c b/src/lib/krb5/krb5_libinit.c index beeb06d..547be4d 100644 --- a/src/lib/krb5/krb5_libinit.c +++ b/src/lib/krb5/krb5_libinit.c @@ -1,5 +1,9 @@ #include <assert.h> +#if TARGET_OS_MAC + #include <Kerberos/com_err.h> +#endif + #include "krb5.h" #include "krb5_err.h" #include "kv5m_err.h" @@ -16,10 +20,12 @@ krb5_error_code krb5int_initialize_library (void) { if (!initialized) { +#if !TARGET_OS_MAC || USE_HARDCODED_FALLBACK_ERROR_TABLES add_error_table(&et_krb5_error_table); add_error_table(&et_kv5m_error_table); add_error_table(&et_kdb5_error_table); add_error_table(&et_asn1_error_table); +#endif initialized = 1; } @@ -35,14 +41,16 @@ void krb5int_cleanup_library (void) { assert (initialized); -#if defined(_MSDOS) || defined(_WIN32) || defined(macintosh) +#if defined(_MSDOS) || defined(_WIN32) || TARGET_OS_MAC krb5_stdcc_shutdown(); #endif +#if !TARGET_OS_MAC || USE_HARDCODED_FALLBACK_ERROR_TABLES remove_error_table(&et_krb5_error_table); remove_error_table(&et_kv5m_error_table); remove_error_table(&et_kdb5_error_table); remove_error_table(&et_asn1_error_table); +#endif initialized = 0; } |