From 07b86b96c83b3fed0c3930d5f2db3d3a4848fd97 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 28 May 2021 16:18:22 +0100 Subject: [PATCH] src: DragonFlyBSD has mmsghdr struct too Still returns ENOSYS, until the send/recv functions are implemented. PR-URL: https://github.com/libuv/libuv/pull/3040 Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Jameson Nash --- src/unix/freebsd.c | 4 ++-- src/unix/internal.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/unix/freebsd.c b/src/unix/freebsd.c index fe795a0e..1013fe4d 100644 --- a/src/unix/freebsd.c +++ b/src/unix/freebsd.c @@ -265,7 +265,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { int uv__sendmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen) { -#if __FreeBSD__ >= 11 +#if __FreeBSD__ >= 11 && !defined(__DragonFly__) return sendmmsg(fd, mmsg, vlen, /* flags */ 0); #else return errno = ENOSYS, -1; @@ -274,7 +274,7 @@ int uv__sendmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen) { int uv__recvmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen) { -#if __FreeBSD__ >= 11 +#if __FreeBSD__ >= 11 && !defined(__DragonFly__) return recvmmsg(fd, mmsg, vlen, 0 /* flags */, NULL /* timeout */); #else return errno = ENOSYS, -1; diff --git a/src/unix/internal.h b/src/unix/internal.h index 5593e494..c2c42560 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -333,7 +333,8 @@ int uv__getsockpeername(const uv_handle_t* handle, #if defined(__linux__) || \ defined(__FreeBSD__) || \ - defined(__FreeBSD_kernel__) + defined(__FreeBSD_kernel__) || \ + defined(__DragonFly__) #define HAVE_MMSG 1 struct uv__mmsghdr { struct msghdr msg_hdr;