mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 10:22:56 +02:00
ulogd: add alpine patch to fix musl
This commit is contained in:
parent
b852133d7e
commit
59559bd095
2 changed files with 65 additions and 1 deletions
62
srcpkgs/ulogd/patches/musl-fixes.patch
Normal file
62
srcpkgs/ulogd/patches/musl-fixes.patch
Normal file
|
@ -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) {
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'ulogd'
|
# Template file for 'ulogd'
|
||||||
pkgname=ulogd
|
pkgname=ulogd
|
||||||
version=2.0.5
|
version=2.0.5
|
||||||
revision=2
|
revision=3
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||||
hostmakedepends="pkg-config automake"
|
hostmakedepends="pkg-config automake"
|
||||||
|
@ -12,3 +12,5 @@ short_desc="A userspace logging daemon for netfilter/iptables related logging"
|
||||||
distfiles="http://www.netfilter.org/projects/${pkgname}/files/${pkgname}-${version}.tar.bz2"
|
distfiles="http://www.netfilter.org/projects/${pkgname}/files/${pkgname}-${version}.tar.bz2"
|
||||||
checksum=a221cb9f77347c0ca00d0937e27c1b90e3291a553cc62a4139b788e2e420e8c0
|
checksum=a221cb9f77347c0ca00d0937e27c1b90e3291a553cc62a4139b788e2e420e8c0
|
||||||
configure_args="--sbindir=/usr/bin"
|
configure_args="--sbindir=/usr/bin"
|
||||||
|
patch_args="-Np1"
|
||||||
|
CFLAGS="-D_GNU_SOURCE"
|
||||||
|
|
Loading…
Add table
Reference in a new issue