aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-25 19:18:52 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-26 07:57:09 +0100
commit1eb14d730502d3f87111ae50d997e48def660623 (patch)
tree1e2ea7479a7263a7f160accc2f226b8d365916ab /util.h
parentfa7e2e7016e45c3cf98ba92e0af30d9adc0f691f (diff)
downloadpasst-1eb14d730502d3f87111ae50d997e48def660623.tar
passt-1eb14d730502d3f87111ae50d997e48def660623.tar.gz
passt-1eb14d730502d3f87111ae50d997e48def660623.tar.bz2
passt-1eb14d730502d3f87111ae50d997e48def660623.tar.lz
passt-1eb14d730502d3f87111ae50d997e48def660623.tar.xz
passt-1eb14d730502d3f87111ae50d997e48def660623.tar.zst
passt-1eb14d730502d3f87111ae50d997e48def660623.zip
util: Fall-back definitions for SECCOMP_RET_KILL_PROCESS, ETH_{MAX,MIN}_MTU
They're not available on some older toolchains. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.h b/util.h
index 44c85db..63cd8f9 100644
--- a/util.h
+++ b/util.h
@@ -8,6 +8,16 @@ void warn(const char *format, ...);
void info(const char *format, ...);
void debug(const char *format, ...);
+#ifndef SECCOMP_RET_KILL_PROCESS
+#define SECCOMP_RET_KILL_PROCESS SECCOMP_RET_KILL
+#endif
+#ifndef ETH_MAX_MTU
+#define ETH_MAX_MTU USHRT_MAX
+#endif
+#ifndef ETH_MIN_MTU
+#define ETH_MIN_MTU 68
+#endif
+
#define CHECK_SET_MIN_MAX(basename, fd) \
do { \
if ((fd) < basename##min) \