Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/dns/dnsreflector/files/patch-dnsreflector.c
16461 views
1
--- dnsreflector.c.orig 2009-05-30 14:02:43.000000000 +0300
2
+++ dnsreflector.c 2009-05-30 14:04:31.000000000 +0300
3
@@ -87,8 +87,7 @@
4
5
#define MAXQUERY (PACKETSZ - sizeof(ADDITIONAL) - sizeof(AUTHORITY) - sizeof(ANSWER_AAAA))
6
7
-static struct syslog_data sdata = SYSLOG_DATA_INIT;
8
-
9
+static int daemonize = 0;
10
static void
11
logit(int level, const char *fmt, ...)
12
{
13
@@ -97,8 +96,8 @@
14
15
va_start(ap, fmt);
16
17
- if (sdata.opened) {
18
- vsyslog_r(level, &sdata, fmt, ap);
19
+ if (daemonize) {
20
+ vsyslog(level, fmt, ap);
21
} else {
22
fprintf(stderr, "%s: ", __progname);
23
vfprintf(stderr, fmt, ap);
24
@@ -148,7 +147,6 @@
25
26
/* Options and their defaults */
27
char *address = NULL;
28
- int daemonize = 0;
29
int port = 53000;
30
31
/* Process commandline arguments */
32
@@ -186,8 +184,6 @@
33
/* Use syslog if daemonized */
34
if (daemonize) {
35
tzset();
36
- openlog_r("dnsreflector", LOG_PID | LOG_NDELAY, LOG_DAEMON,
37
- &sdata);
38
}
39
40
/* Daemonize if requested */
41
42