summaryrefslogtreecommitdiff
path: root/package/ulogd/patches/patch-src_ulogd_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/ulogd/patches/patch-src_ulogd_c')
-rw-r--r--package/ulogd/patches/patch-src_ulogd_c47
1 files changed, 47 insertions, 0 deletions
diff --git a/package/ulogd/patches/patch-src_ulogd_c b/package/ulogd/patches/patch-src_ulogd_c
new file mode 100644
index 000000000..dd24023ce
--- /dev/null
+++ b/package/ulogd/patches/patch-src_ulogd_c
@@ -0,0 +1,47 @@
+--- ulogd-2.0.2.orig/src/ulogd.c 2013-03-01 16:45:23.285968838 +0100
++++ ulogd-2.0.2/src/ulogd.c 2013-08-20 19:09:53.029031721 +0200
+@@ -78,7 +78,7 @@
+ static FILE *logfile = NULL; /* logfile pointer */
+ static char *ulogd_logfile = NULL;
+ static const char *ulogd_configfile = ULOGD_CONFIGFILE;
+-static FILE syslog_dummy;
++static FILE *syslog_dummy = NULL;
+
+ static int info_mode = 0;
+
+@@ -420,7 +420,7 @@ void __ulogd_log(int level, char *file,
+ if (level < loglevel_ce.u.value)
+ return;
+
+- if (logfile == &syslog_dummy) {
++ if (logfile == syslog_dummy) {
+ /* FIXME: this omits the 'file' string */
+ va_start(ap, format);
+ vsyslog(ulogd2syslog_level(level), format, ap);
+@@ -941,7 +941,7 @@ static int logfile_open(const char *name
+ logfile = stdout;
+ } else if (!strcmp(name, "syslog")) {
+ openlog("ulogd", LOG_PID, LOG_DAEMON);
+- logfile = &syslog_dummy;
++ logfile = syslog_dummy;
+ } else {
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {
+@@ -1070,7 +1070,7 @@ static void sigterm_handler(int signal)
+ unload_plugins();
+ #endif
+
+- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != NULL && logfile != stdout && logfile != syslog_dummy) {
+ fclose(logfile);
+ logfile = NULL;
+ }
+@@ -1090,7 +1090,7 @@ static void signal_handler(int signal)
+ switch (signal) {
+ case SIGHUP:
+ /* reopen logfile */
+- if (logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != stdout && logfile != syslog_dummy) {
+ fclose(logfile);
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {