summaryrefslogtreecommitdiff
path: root/dns/dnsreflector/files/patch-dnsreflector.c
diff options
context:
space:
mode:
Diffstat (limited to 'dns/dnsreflector/files/patch-dnsreflector.c')
-rw-r--r--dns/dnsreflector/files/patch-dnsreflector.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/dns/dnsreflector/files/patch-dnsreflector.c b/dns/dnsreflector/files/patch-dnsreflector.c
new file mode 100644
index 000000000000..b5c02658f476
--- /dev/null
+++ b/dns/dnsreflector/files/patch-dnsreflector.c
@@ -0,0 +1,40 @@
+--- dnsreflector.c.orig 2009-05-30 14:02:43.000000000 +0300
++++ dnsreflector.c 2009-05-30 14:04:31.000000000 +0300
+@@ -87,8 +87,7 @@
+
+ #define MAXQUERY (PACKETSZ - sizeof(ADDITIONAL) - sizeof(AUTHORITY) - sizeof(ANSWER_AAAA))
+
+-static struct syslog_data sdata = SYSLOG_DATA_INIT;
+-
++static int daemonize = 0;
+ static void
+ logit(int level, const char *fmt, ...)
+ {
+@@ -97,8 +96,8 @@
+
+ va_start(ap, fmt);
+
+- if (sdata.opened) {
+- vsyslog_r(level, &sdata, fmt, ap);
++ if (daemonize) {
++ vsyslog(level, fmt, ap);
+ } else {
+ fprintf(stderr, "%s: ", __progname);
+ vfprintf(stderr, fmt, ap);
+@@ -148,7 +147,6 @@
+
+ /* Options and their defaults */
+ char *address = NULL;
+- int daemonize = 0;
+ int port = 53000;
+
+ /* Process commandline arguments */
+@@ -186,8 +184,6 @@
+ /* Use syslog if daemonized */
+ if (daemonize) {
+ tzset();
+- openlog_r("dnsreflector", LOG_PID | LOG_NDELAY, LOG_DAEMON,
+- &sdata);
+ }
+
+ /* Daemonize if requested */