krb5 commit: Fix build when KRB5_DNS_LOOKUP isn't defined

ghudson at mit.edu ghudson at mit.edu
Tue Nov 11 22:37:53 EST 2025


https://github.com/krb5/krb5/commit/3c672caba714164f26a7464ba82873dff750573c
commit 3c672caba714164f26a7464ba82873dff750573c
Author: Sven Püschel <s.pueschel at pengutronix.de>
Date:   Tue Oct 28 16:08:59 2025 +0100

    Fix build when KRB5_DNS_LOOKUP isn't defined
    
    Commit fabbf11f457a84904a5fa251584fd660a52fa583 mistakenly defined the
    kdclist and kdclist_entry structures inside a KRB5_DNS_LOOKUP
    conditional.  Move the definitions outside of the conditional.
    
    [ghudson at mit.edu: edited commit message]

 src/lib/krb5/os/locate_kdc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c
index d1df04a63..c186bce51 100644
--- a/src/lib/krb5/os/locate_kdc.c
+++ b/src/lib/krb5/os/locate_kdc.c
@@ -28,16 +28,6 @@
 #include "fake-addrinfo.h"
 #include "os-proto.h"
 
-#ifdef KRB5_DNS_LOOKUP
-
-#define DEFAULT_LOOKUP_KDC 1
-#if KRB5_DNS_LOOKUP_REALM
-#define DEFAULT_LOOKUP_REALM 1
-#else
-#define DEFAULT_LOOKUP_REALM 0
-#endif
-#define DEFAULT_URI_LOOKUP TRUE
-
 struct kdclist_entry {
     krb5_data realm;
     struct server_entry server;
@@ -48,6 +38,16 @@ struct kdclist {
     struct kdclist_entry *list;
 };
 
+#ifdef KRB5_DNS_LOOKUP
+
+#define DEFAULT_LOOKUP_KDC 1
+#if KRB5_DNS_LOOKUP_REALM
+#define DEFAULT_LOOKUP_REALM 1
+#else
+#define DEFAULT_LOOKUP_REALM 0
+#endif
+#define DEFAULT_URI_LOOKUP TRUE
+
 static int
 maybe_use_dns (krb5_context context, const char *name, int defalt)
 {


More information about the cvs-krb5 mailing list