You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/logrotate/files/logrotate-3.7.7-fbsd.patch

46 lines
983 B

Fix compilation on Gentoo/FreeBSD, no alloca.h here and PATH_MAX
is defined elsewhere.
See bug 254795
--- logrotate-3.7.7.orig/config.c
+++ logrotate-3.7.7/config.c
@@ -1,5 +1,7 @@
#include <sys/queue.h>
+#ifndef NO_ALLOCA_H
#include <alloca.h>
+#endif /* NO_ALLOCA_H */
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
@@ -21,6 +21,9 @@
#include <wctype.h>
#include <fnmatch.h>
+#if !defined(PATH_MAX) && defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
#include "basenames.h"
#include "log.h"
#include "logrotate.h"
--- logrotate-3.7.7.orig/logrotate.c
+++ logrotate-3.7.7/logrotate.c
@@ -1,5 +1,7 @@
#include <sys/queue.h>
+#ifndef NO_ALLOCA_H
#include <alloca.h>
+#endif /* NO_ALLOCA_H */
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
@@ -24,6 +24,9 @@
int selinux_enforce = 0;
#endif
+#if !defined(PATH_MAX) && defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
#include "basenames.h"
#include "log.h"
#include "logrotate.h"