summaryrefslogtreecommitdiff
path: root/epan/addr_resolv.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-07-19 22:24:28 +0000
committerGerald Combs <gerald@wireshark.org>2005-07-19 22:24:28 +0000
commit570d352948f4bbb47cec76e371f69bcff6675c90 (patch)
treedfe7d2b94d4e593072f4ab37233f1f8a92c131f4 /epan/addr_resolv.c
parent4545d72483ce4325deb2fe66394f13f1c5a36322 (diff)
downloadwireshark-570d352948f4bbb47cec76e371f69bcff6675c90.tar.gz
Move Win32-specific variable declaration to the beginning of a function.
Fixes a recent buildbot failure. svn path=/trunk/; revision=14962
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r--epan/addr_resolv.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 7bded7ba45..b1ca1b97e2 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -1611,6 +1611,14 @@ void
host_name_lookup_init(void) {
char *hostspath;
+#ifdef HAVE_GNU_ADNS
+#ifdef WIN32
+ char *sysroot;
+ static char rootpath_nt[] = "\\system32\\drivers\\etc\\hosts";
+ static char rootpath_ot[] = "\\hosts";
+#endif /* WIN32 */
+#endif /*GNU_ADNS */
+
/*
* Load the user's hosts file, if they have one.
*/
@@ -1626,9 +1634,6 @@ host_name_lookup_init(void) {
* we load that file ourselves.
*/
#ifdef WIN32
- char *sysroot;
- static char rootpath_nt[] = "\\system32\\drivers\\etc\\hosts";
- static char rootpath_ot[] = "\\hosts";
sysroot = getenv("WINDIR");
if (sysroot != NULL) {