aboutsummaryrefslogtreecommitdiff
path: root/contrib/blocklist/port/port.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/blocklist/port/port.h')
-rw-r--r--contrib/blocklist/port/port.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/contrib/blocklist/port/port.h b/contrib/blocklist/port/port.h
index f82fb34b40f5..d1a9ac6bd6e5 100644
--- a/contrib/blocklist/port/port.h
+++ b/contrib/blocklist/port/port.h
@@ -1,6 +1,7 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#include <sys/param.h>
#include <stdio.h>
#include <inttypes.h>
#include <time.h>
@@ -15,6 +16,22 @@
#define __dead __attribute__((__noreturn__))
#endif
+#ifndef __BEGIN_DECLS
+#define __BEGIN_DECLS
+#endif
+
+#ifndef __END_DECLS
+#define __END_DECLS
+#endif
+
+#ifndef MIN
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
#ifndef __RCSID
#define __RCSID(a)
#endif
@@ -27,6 +44,10 @@
#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
#endif
+#ifndef __STRING
+#define __STRING(x) #x
+#endif
+
#ifndef HAVE_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
@@ -78,9 +99,10 @@ int clock_gettime(int, struct timespec *);
#define CLOCK_REALTIME 0
#endif
-#if !defined(__FreeBSD__)
-#define _PATH_BLCONF "conf"
-#define _PATH_BLCONTROL "control"
-#define _PATH_BLSOCK "blacklistd.sock"
-#define _PATH_BLSTATE "blacklistd.db"
+#ifndef HAVE_VSYSLOG_R
+#define SYSLOG_DATA_INIT { 0 }
+struct syslog_data {
+ int dummy;
+};
+void vsyslog_r(int, struct syslog_data *, const char *, va_list);
#endif