diff options
author | Tom Jones <thj@freebsd.org> | 2024-01-30 16:21:58 +0000 |
---|---|---|
committer | Tom Jones <thj@freebsd.org> | 2024-02-23 10:51:40 +0000 |
commit | b613d411a4c76ca69b1a57d239ec617d1e4f410e (patch) | |
tree | 8ebccc21de085ae8056b90713483db2d0ca4ba43 /src | |
parent | 5ed27ef8b6362ee2a30dd8f6094fa8ca32a97439 (diff) |
vcl: Use FreeBSD specific errno value for bad fd
Type: improvement
Change-Id: I7693f2647f65f662c9b20f77bbf7e1a530b58259
Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/vcl/vppcom.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <sys/types.h> +#endif /* __FreeBSD__ */ #include <netdb.h> #include <errno.h> #include <fcntl.h> @@ -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, |