From 4737a11fbb746519bb7cbd040546f799fbfb3a0f Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 10 Feb 2018 00:31:45 -0500 Subject: Make public headers work with gcc -Wundef The C standard allows undefined symbols in #if statements, giving them the value 0 (C99 section 6.10.1). However, some software builds with gcc -Wundef, which issues a warning on undefined symbols in preprocessor expressions. Make the public headers safe for that environment by using #ifdef instead of #if for TARGET_OS_MAC. Reported by Ben Kaduk. ticket: 8641 (new) --- src/include/krb5/krb5.hin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/krb5/krb5.hin') diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index c86e782..55135fc 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -106,7 +106,7 @@ KRB5INT_BEGIN_DECLS -#if TARGET_OS_MAC +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC # pragma pack(push,2) #endif @@ -8481,7 +8481,7 @@ krb5_set_kdc_recv_hook(krb5_context context, krb5_post_recv_fn recv_hook, void *data); -#if TARGET_OS_MAC +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC # pragma pack(pop) #endif -- cgit v1.1