]> granicus.if.org Git - sudo/commitdiff
Fix compilation when getdomainame() is not present.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 1 Apr 2013 20:35:35 +0000 (16:35 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 1 Apr 2013 20:35:35 +0000 (16:35 -0400)
plugins/sudoers/match.c

index 2ace1548c85e50902e066240a517ae6995066192..4137318224d41e1dd337ea5437cbac8998aec776 100644 (file)
@@ -771,8 +771,9 @@ done:
 static char *
 sudo_getdomainname(void)
 {
+    char *domain = NULL;
 #ifdef HAVE_GETDOMAINNAME
-    char *buf, *cp, *domain = NULL;
+    char *buf, *cp;
 
     buf = emalloc(HOST_NAME_MAX + 1);
     if (getdomainname(buf, HOST_NAME_MAX + 1) == 0 && *buf != '\0') {