aboutsummaryrefslogtreecommitdiffstats
path: root/main/ulogd/musl-fixes.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-12-20 06:49:01 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-12-20 06:49:01 +0000
commit6b4410b36643817d3eddb1db61a0d3b8360885b9 (patch)
tree0c2b22e9c26bfeff8591f488b1f5dfb3d669dbb9 /main/ulogd/musl-fixes.patch
parent21d97e1607395bd694e0fd5f34705ae6cb77baa6 (diff)
downloadaports-6b4410b36643817d3eddb1db61a0d3b8360885b9.tar.bz2
aports-6b4410b36643817d3eddb1db61a0d3b8360885b9.tar.xz
main/ulogd: fix musl build
Diffstat (limited to 'main/ulogd/musl-fixes.patch')
-rw-r--r--main/ulogd/musl-fixes.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/main/ulogd/musl-fixes.patch b/main/ulogd/musl-fixes.patch
new file mode 100644
index 0000000000..1b23de7dfe
--- /dev/null
+++ b/main/ulogd/musl-fixes.patch
@@ -0,0 +1,62 @@
+--- ulogd-2.0.3.orig/filter/raw2packet/ulogd_raw2packet_BASE.c
++++ ulogd-2.0.3/filter/raw2packet/ulogd_raw2packet_BASE.c
+@@ -43,6 +43,7 @@
+ #include <ulogd/ipfix_protocol.h>
+ #include <netinet/if_ether.h>
+ #include <string.h>
++#include <linux/types.h>
+
+ enum input_keys {
+ INKEY_RAW_PCKT,
+--- ulogd-2.0.3.orig/src/ulogd.c
++++ ulogd-2.0.3/src/ulogd.c
+@@ -78,12 +78,12 @@
+ "(C) 2008-2012 Eric Leblond <eric@regit.org>\n"
+
+ /* global variables */
++static int log_to_syslog = 0;
+ static FILE *logfile = NULL; /* logfile pointer */
+ static char *ulogd_logfile = NULL;
+ static const char *ulogd_configfile = ULOGD_CONFIGFILE;
+ static const char *ulogd_pidfile = NULL;
+ static int ulogd_pidfile_fd = -1;
+-static FILE syslog_dummy;
+
+ static int info_mode = 0;
+
+@@ -427,7 +427,7 @@
+ if (level < loglevel_ce.u.value)
+ return;
+
+- if (logfile == &syslog_dummy) {
++ if (log_to_syslog) {
+ /* FIXME: this omits the 'file' string */
+ va_start(ap, format);
+ vsyslog(ulogd2syslog_level(level), format, ap);
+@@ -950,7 +950,7 @@
+ logfile = stdout;
+ } else if (!strcmp(name, "syslog")) {
+ openlog("ulogd", LOG_PID, LOG_DAEMON);
+- logfile = &syslog_dummy;
++ log_to_syslog = 1;
+ } else {
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {
+@@ -1240,7 +1240,7 @@
+ unload_plugins();
+ #endif
+
+- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != NULL && logfile != stdout) {
+ fclose(logfile);
+ logfile = NULL;
+ }
+@@ -1262,7 +1262,7 @@
+ switch (signal) {
+ case SIGHUP:
+ /* reopen logfile */
+- if (logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != stdout && logfile != NULL) {
+ fclose(logfile);
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {