summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-01-29 15:23:23 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-02-19 18:12:06 +0000
commit078affa92c4f21957094e3e432af55f4df10bbaf (patch)
tree8abf0704fca2b13ccb80c87fb5a9c3574416dd04 /src/vnet/ip
parentac80b8be8be5757b667a9aa7ddf258b36f695a5a (diff)
vnet: include platform specific un.h
On FreeBSD define UNIX_PATH_MAX so it is available in punt.c. FreeBSD's max path is 4 bytes shorter than Linux's. Type: improvement Change-Id: I2c4b7aa11246213575b557fab44669706885e6b7 Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/punt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/ip/punt.h b/src/vnet/ip/punt.h
index 09e6e7393d6..e8495caad61 100644
--- a/src/vnet/ip/punt.h
+++ b/src/vnet/ip/punt.h
@@ -20,7 +20,12 @@
#ifndef included_punt_h
#define included_punt_h
+#ifdef __linux__
#include <linux/un.h>
+#elif __FreeBSD__
+#include <sys/un.h>
+#define UNIX_PATH_MAX SUNPATHLEN
+#endif /* __linux__ */
#include <stdbool.h>
#include <vnet/ip/ip.h>