devel/libepoll-shim: update to 0.0.20210418

Changes:	https://github.com/jiixyj/epoll-shim/compare/v0.0.20210322...v0.0.20210418
Reported by:	portscout
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D29822
This commit is contained in:
Jan Beich 2021-04-17 08:25:49 +00:00
parent c2dfc2d552
commit bc9e901a17
6 changed files with 35 additions and 22 deletions

View File

@ -34,6 +34,7 @@ CONFIGURE_ARGS= --with-xml2-prefix=${LOCALBASE} \
--with-hdf5-prefix=${LOCALBASE} \
--with-mbedtls-prefix=${LOCALBASE} \
CC="${CC}" CXX="${CXX}" TOOLS="${CHOSEN_COMPILER_TYPE}"
MAKE_ENV+= CPATH="${LOCALBASE}/include/libepoll-shim"
MAKE_ARGS+= CCNAME=${CC} CXXNAME=${CXX} PKGCFLAGS="${CFLAGS}"
CFLAGS+= -I${WRKSRC}/lib

View File

@ -1,11 +0,0 @@
--- libs/kns/linux/syspoll.c.orig 2021-04-12 05:19:32 UTC
+++ libs/kns/linux/syspoll.c
@@ -43,7 +43,7 @@
#include <unistd.h>
#include <errno.h>
-#include <sys/epoll.h>
+#include <libepoll-shim/sys/epoll.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -2,7 +2,7 @@
PORTNAME= libepoll-shim
DISTVERSIONPREFIX= v
DISTVERSION= 0.0.20210322
DISTVERSION= 0.0.20210418
CATEGORIES= devel
MAINTAINER= x11@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1616417046
SHA256 (jiixyj-epoll-shim-v0.0.20210322_GH0.tar.gz) = 5b8809f4d0f6c0cae1879b936fa98f4f219f3bf30656f4d1de403811e401bb0f
SIZE (jiixyj-epoll-shim-v0.0.20210322_GH0.tar.gz) = 86359
TIMESTAMP = 1618774132
SHA256 (jiixyj-epoll-shim-v0.0.20210418_GH0.tar.gz) = 10d5ff1f4389e121fa2a07e0873eb61030ae655af9fd6980661eaa7fbb682b06
SIZE (jiixyj-epoll-shim-v0.0.20210418_GH0.tar.gz) = 91936

View File

@ -1,3 +1,7 @@
include/libepoll-shim/epoll-shim/detail/common.h
include/libepoll-shim/epoll-shim/detail/poll.h
include/libepoll-shim/epoll-shim/detail/read.h
include/libepoll-shim/epoll-shim/detail/write.h
include/libepoll-shim/sys/epoll.h
%%SHIM_EVENTFD%%include/libepoll-shim/sys/eventfd.h
include/libepoll-shim/sys/signalfd.h

View File

@ -9,7 +9,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
@@ -73,10 +75,12 @@ socket(int domain, int type, int protocol)
@@ -73,15 +75,22 @@ socket(int domain, int type, int protocol)
{
wrapped_calls_socket++;
@ -22,7 +22,17 @@
return real_socket(domain, type, protocol);
}
@@ -89,10 +93,12 @@ fcntl(int fd, int cmd, ...)
__attribute__ ((visibility("default"))) int
+#ifdef fcntl
+/* Work around #define fcntl in epoll-shim */
+#define old_fcntl fcntl
+#undef fcntl
+#endif
fcntl(int fd, int cmd, ...)
{
va_list ap;
@@ -89,10 +98,12 @@ fcntl(int fd, int cmd, ...)
wrapped_calls_fcntl++;
@ -35,7 +45,16 @@
va_start(ap, cmd);
arg = va_arg(ap, void*);
@@ -106,10 +112,12 @@ recvmsg(int sockfd, struct msghdr *msg, int flags)
@@ -100,16 +111,21 @@ fcntl(int fd, int cmd, ...)
return real_fcntl(fd, cmd, arg);
}
+#ifdef old_fcntl
+#define fcntl old_fcntl
+#endif
__attribute__ ((visibility("default"))) ssize_t
recvmsg(int sockfd, struct msghdr *msg, int flags)
{
wrapped_calls_recvmsg++;
@ -48,7 +67,7 @@
return real_recvmsg(sockfd, msg, flags);
}
@@ -156,12 +164,14 @@ TEST(os_wrappers_socket_cloexec)
@@ -156,12 +172,14 @@ TEST(os_wrappers_socket_cloexec)
do_os_wrappers_socket_cloexec(0);
}
@ -63,7 +82,7 @@
static void
do_os_wrappers_dupfd_cloexec(int n)
@@ -195,11 +205,13 @@ TEST(os_wrappers_dupfd_cloexec)
@@ -195,11 +213,13 @@ TEST(os_wrappers_dupfd_cloexec)
do_os_wrappers_dupfd_cloexec(0);
}
@ -77,7 +96,7 @@
struct marshal_data {
struct wl_connection *read_connection;
@@ -218,8 +230,7 @@ struct marshal_data {
@@ -218,8 +238,7 @@ struct marshal_data {
static void
setup_marshal_data(struct marshal_data *data)
{
@ -87,7 +106,7 @@
data->read_connection = wl_connection_create(data->s[0]);
assert(data->read_connection);
@@ -328,11 +339,13 @@ TEST(os_wrappers_recvmsg_cloexec)
@@ -328,11 +347,13 @@ TEST(os_wrappers_recvmsg_cloexec)
do_os_wrappers_recvmsg_cloexec(0);
}