make conditional on apple and have_gcd
authorLove Hornquist Astrand <lha@h5l.org>
Wed, 8 Sep 2010 16:50:50 +0000 (09:50 -0700)
committerLove Hornquist Astrand <lha@h5l.org>
Wed, 8 Sep 2010 16:50:50 +0000 (09:50 -0700)
kdc/announce.c

index bfb6b89312629d24ab26b9e76d7328daa1c6b8e1..1a07c36f3907c3111d841657e96276e01d48c978 100644 (file)
@@ -23,7 +23,9 @@
  *
  */
 
-#ifdef __APPLE__
+#include "config.h"
+
+#if defined(__APPLE__) && defined(HAVE_GCD)
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <SystemConfiguration/SCDynamicStore.h>
@@ -525,10 +527,12 @@ register_notification(void)
 
     return store;
 }
+#endif
 
 void
 bonjour_announce(krb5_context context, krb5_kdc_configuration *config)
 {
+#if defined(__APPLE__) && defined(HAVE_GCD)
     g_queue = dispatch_queue_create("com.apple.kdc_announce", NULL);
     if (!g_queue)
        errx(1, "dispatch_queue_create");
@@ -538,6 +542,5 @@ bonjour_announce(krb5_context context, krb5_kdc_configuration *config)
     announce_context = context;
        
     create_dns_sd();
+#endif
 }
-
-#endif /* __APPLE__ */