Ingen beskrivning

100-musl-compat.patch 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- a/src/ulogd.c
  2. +++ b/src/ulogd.c
  3. @@ -83,7 +83,7 @@ static char *ulogd_logfile = NULL;
  4. static const char *ulogd_configfile = ULOGD_CONFIGFILE;
  5. static const char *ulogd_pidfile = NULL;
  6. static int ulogd_pidfile_fd = -1;
  7. -static FILE syslog_dummy;
  8. +static int ulogd_use_syslog = 0;
  9. static int info_mode = 0;
  10. @@ -427,7 +427,7 @@ void __ulogd_log(int level, char *file,
  11. if (level < loglevel_ce.u.value)
  12. return;
  13. - if (logfile == &syslog_dummy) {
  14. + if (ulogd_use_syslog) {
  15. /* FIXME: this omits the 'file' string */
  16. va_start(ap, format);
  17. vsyslog(ulogd2syslog_level(level), format, ap);
  18. @@ -950,7 +950,7 @@ static int logfile_open(const char *name
  19. logfile = stdout;
  20. } else if (!strcmp(name, "syslog")) {
  21. openlog("ulogd", LOG_PID, LOG_DAEMON);
  22. - logfile = &syslog_dummy;
  23. + ulogd_use_syslog = 1;
  24. } else {
  25. logfile = fopen(ulogd_logfile, "a");
  26. if (!logfile) {
  27. @@ -1240,7 +1240,7 @@ static void sigterm_handler(int signal)
  28. unload_plugins();
  29. #endif
  30. - if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
  31. + if (logfile != NULL && logfile != stdout) {
  32. fclose(logfile);
  33. logfile = NULL;
  34. }
  35. @@ -1262,7 +1262,7 @@ static void signal_handler(int signal)
  36. switch (signal) {
  37. case SIGHUP:
  38. /* reopen logfile */
  39. - if (logfile != stdout && logfile != &syslog_dummy) {
  40. + if (logfile != NULL && logfile != stdout) {
  41. fclose(logfile);
  42. logfile = fopen(ulogd_logfile, "a");
  43. if (!logfile) {
  44. --- a/filter/raw2packet/ulogd_raw2packet_BASE.c
  45. +++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
  46. @@ -42,6 +42,7 @@
  47. #include <ulogd/ulogd.h>
  48. #include <ulogd/ipfix_protocol.h>
  49. #include <netinet/if_ether.h>
  50. +#include <linux/types.h>
  51. #include <string.h>
  52. enum input_keys {