aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2014-02-12 06:35:45 +0800
committermi <mi@FreeBSD.org>2014-02-12 06:35:45 +0800
commit677f4618a6de0cd4a8f28602d3ec7c1514bd1945 (patch)
treec8367f814cfdbf719adff8b97baba2e5b65fbd2b
parent1c846f3a8e9422b0fd393685c17d6c5c2a1bd942 (diff)
downloadfreebsd-ports-gnome-677f4618a6de0cd4a8f28602d3ec7c1514bd1945.tar.gz
freebsd-ports-gnome-677f4618a6de0cd4a8f28602d3ec7c1514bd1945.tar.zst
freebsd-ports-gnome-677f4618a6de0cd4a8f28602d3ec7c1514bd1945.zip
Add a patch to make the invocation of select(2) work in CEPoll::wait() method.
Applicable only to non-Linux platforms, such as FreeBSD. Bump PORTREVISION. Obtained from: https://sourceforge.net/p/udt/patches/12/
-rw-r--r--net/udt/Makefile1
-rw-r--r--net/udt/files/patch-fix-select-call30
2 files changed, 31 insertions, 0 deletions
diff --git a/net/udt/Makefile b/net/udt/Makefile
index a17c66e2cea9..a20f3f0a06fa 100644
--- a/net/udt/Makefile
+++ b/net/udt/Makefile
@@ -3,6 +3,7 @@
PORTNAME= udt
PORTVERSION= 4.11
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= SF
DISTNAME= udt.sdk.${PORTVERSION}
diff --git a/net/udt/files/patch-fix-select-call b/net/udt/files/patch-fix-select-call
new file mode 100644
index 000000000000..f55dda82e054
--- /dev/null
+++ b/net/udt/files/patch-fix-select-call
@@ -0,0 +1,30 @@
+From
+ http://sourceforge.net/p/udt/patches/12/
+
+--- src/epoll.cpp
++++ src/epoll.cpp
+@@ -256,18 +256,23 @@ int CEPoll::wait(const int eid, set<UDTSOCKET>* readfds, set<UDTSOCKET>* writefd
+ FD_ZERO(&readfds);
+ FD_ZERO(&writefds);
+
++ //"select" needs to know the max file descriptor that is set in the fd_set structs
++ SYSSOCKET max_fd = 0;
++
+ for (set<SYSSOCKET>::const_iterator i = p->second.m_sLocals.begin(); i != p->second.m_sLocals.end(); ++ i)
+ {
+ if (lrfds)
+ FD_SET(*i, &readfds);
+ if (lwfds)
+ FD_SET(*i, &writefds);
++ if (*i > max_fd)
++ max_fd = *i;
+ }
+
+ timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+- if (::select(0, &readfds, &writefds, NULL, &tv) > 0)
++ if (::select(max_fd + 1, &readfds, &writefds, NULL, &tv) > 0)
+ {
+ for (set<SYSSOCKET>::const_iterator i = p->second.m_sLocals.begin(); i != p->second.m_sLocals.end(); ++ i)
+ {