Merge "Revert "dnsmasq: Disable DNS server updation via STDIN on Brillo."" am: 1e03ec8dc8
am: f61cedc9fa
Change-Id: Ifd9c9feac21e5d89ae591a5bbafad2d8fc811742
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 3d7bdb5..c98fda2 100755
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -72,7 +72,7 @@
static void async_event(int pipe, time_t now);
static void fatal_event(struct event_desc *ev);
static void poll_resolv(void);
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
static int set_android_listeners(fd_set *set, int *maxfdp);
static int check_android_listeners(fd_set *set);
#endif
@@ -293,7 +293,7 @@
if (!(daemon->options & OPT_DEBUG))
{
-#if !defined(__ANDROID__) || defined(__BRILLO__)
+#ifndef __ANDROID__
int nullfd;
#endif
@@ -362,7 +362,7 @@
}
}
-#if !defined(__ANDROID__) || defined(__BRILLO__)
+#ifndef __ANDROID__
/* open stdout etc to /dev/null */
nullfd = open("/dev/null", O_RDWR);
dup2(nullfd, STDOUT_FILENO);
@@ -529,7 +529,7 @@
t.tv_usec = 0;
tp = &t;
}
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
set_android_listeners(&rset, &maxfd);
#endif
@@ -598,7 +598,7 @@
netlink_multicast();
#endif
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
check_android_listeners(&rset);
#endif
@@ -870,7 +870,7 @@
#endif
}
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
static int set_android_listeners(fd_set *set, int *maxfdp) {
FD_SET(STDIN_FILENO, set);
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index 5b696b2..99b683c 100755
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -740,7 +740,7 @@
int random_sock(int family);
void pre_allocate_sfds(void);
int reload_servers(char *fname);
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
int set_servers(const char *servers);
void set_interfaces(const char *interfaces);
#endif
diff --git a/src/network.c b/src/network.c
index b1a06e4..ea96793 100755
--- a/src/network.c
+++ b/src/network.c
@@ -918,7 +918,7 @@
daemon->servers = ret;
}
-#if defined(__ANDROID__) && !defined(__BRILLO__)
+#ifdef __ANDROID__
/* #define __ANDROID_DEBUG__ 1 */
/*
* Ingests a new list of interfaces and starts to listen on them, adding only the new