From b613d411a4c76ca69b1a57d239ec617d1e4f410e Mon Sep 17 00:00:00 2001 From: Tom Jones Date: Tue, 30 Jan 2024 16:21:58 +0000 Subject: vcl: Use FreeBSD specific errno value for bad fd Type: improvement Change-Id: I7693f2647f65f662c9b20f77bbf7e1a530b58259 Signed-off-by: Tom Jones --- src/vcl/vppcom.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h index 7826076a338..5683cb2cf0b 100644 --- a/src/vcl/vppcom.h +++ b/src/vcl/vppcom.h @@ -16,6 +16,9 @@ #ifndef included_vppcom_h #define included_vppcom_h +#ifdef __FreeBSD__ +#include +#endif /* __FreeBSD__ */ #include #include #include @@ -116,7 +119,11 @@ typedef enum VPPCOM_EFAULT = -EFAULT, VPPCOM_ENOMEM = -ENOMEM, VPPCOM_EINVAL = -EINVAL, +#ifdef __linux__ VPPCOM_EBADFD = -EBADFD, +#else + VPPCOM_EBADFD = -EBADF, +#endif /* __linux__ */ VPPCOM_EAFNOSUPPORT = -EAFNOSUPPORT, VPPCOM_ECONNABORTED = -ECONNABORTED, VPPCOM_ECONNRESET = -ECONNRESET, -- cgit 1.2.3-korg