From 3684794336602435b91b91a1dc5bd9401a974432 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 2 Feb 2023 12:56:16 -0800 Subject: vcl: better handlig of ldp apis that rely on gnu source Control use of apis that rely on _GNU_SOURCE being defined with compile time macro. Also fixes sendmmsg and recvmmsg which were not probably wrapped. Type: improvement Signed-off-by: Florin Coras Change-Id: I207de23210d4b9dc960bb4289159502760c5614d --- src/vcl/ldp_glibc_socket.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/vcl/ldp_glibc_socket.h') diff --git a/src/vcl/ldp_glibc_socket.h b/src/vcl/ldp_glibc_socket.h index 95fb7c81094..dcd37208ff6 100644 --- a/src/vcl/ldp_glibc_socket.h +++ b/src/vcl/ldp_glibc_socket.h @@ -200,15 +200,14 @@ recvfrom (int __fd, void *__restrict __buf, extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); -#ifdef __USE_GNU +#ifdef _GNU_SOURCE /* Send a VLEN messages as described by VMESSAGES to socket FD. Returns the number of datagrams successfully written or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ -extern int -sendmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags); +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); #endif /* Receive a message as described by MESSAGE from socket FD. @@ -218,7 +217,7 @@ sendmmsg (int __fd, struct mmsghdr *__vmessages, __THROW. */ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); -#ifdef __USE_GNU +#ifdef _GNU_SOURCE /* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of messages received or -1 for errors. @@ -337,7 +336,7 @@ epoll_pwait (int __epfd, struct epoll_event *__events, __THROW. */ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout); -#ifdef __USE_GNU +#ifdef _GNU_SOURCE /* Like poll, but before waiting the threads signal mask is replaced with that specified in the fourth parameter. For better usability, the timeout value is specified using a TIMESPEC object. -- cgit 1.2.3-korg