aboutsummaryrefslogtreecommitdiffstats
path: root/net/trickle
diff options
context:
space:
mode:
Diffstat (limited to 'net/trickle')
-rw-r--r--net/trickle/Makefile2
-rw-r--r--net/trickle/files/patch-trickle-overload.c39
2 files changed, 29 insertions, 12 deletions
diff --git a/net/trickle/Makefile b/net/trickle/Makefile
index a8bb7adbaec6..c1fd5b71ea9f 100644
--- a/net/trickle/Makefile
+++ b/net/trickle/Makefile
@@ -10,7 +10,7 @@ PORTVERSION= 1.07
CATEGORIES= net
MASTER_SITES= http://monkey.org/~marius/trickle/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= gahr@FreeBSD.org
COMMENT= Lightweight, portable bandwidth shaper
LIB_DEPENDS= event-1.3e:${PORTSDIR}/devel/libevent
diff --git a/net/trickle/files/patch-trickle-overload.c b/net/trickle/files/patch-trickle-overload.c
index 443ef9abd9d7..66aa75ddce93 100644
--- a/net/trickle/files/patch-trickle-overload.c
+++ b/net/trickle/files/patch-trickle-overload.c
@@ -1,11 +1,19 @@
--- trickle-overload.c.orig 2004-12-13 02:21:53.000000000 +0100
-+++ trickle-overload.c 2008-04-15 21:44:29.000000000 +0200
-@@ -141,8 +141,12 @@
++++ trickle-overload.c 2008-04-21 19:23:49.000000000 +0200
+@@ -61,6 +61,7 @@
+
+ #define SD_INSELECT 0x01
+
++
+ struct sockdesc {
+ int sock;
+ int flags;
+@@ -141,8 +142,12 @@
DECLARE(dup2, int, (int, int));
#ifdef HAVE_SENDFILE
+#ifdef __FreeBSD__
-+DECLARE(sendfile, ssize_t, (int, int, off_t, size_t, struct sf_hdtr *, off_t *, int));
++DECLARE(sendfile, int, (int, int, off_t, size_t, struct sf_hdtr *, off_t *, int));
+#else
DECLARE(sendfile, ssize_t, (int, int, off_t *, size_t));
#endif
@@ -13,7 +21,7 @@
static int delay(int, ssize_t *, short);
static struct timeval *getdelay(struct sockdesc *, ssize_t *, short);
-@@ -202,15 +206,11 @@
+@@ -202,15 +207,11 @@
GETADDR(read);
GETADDR(readv);
@@ -29,7 +37,7 @@
GETADDR(sendto);
GETADDR(select);
-@@ -701,7 +701,6 @@
+@@ -701,7 +702,6 @@
return (ret);
}
@@ -37,7 +45,7 @@
ssize_t
recv(int sock, void *buf, size_t len, int flags)
{
-@@ -730,7 +729,6 @@
+@@ -730,7 +730,6 @@
return (ret);
}
@@ -45,7 +53,7 @@
#ifdef __sun__
ssize_t
-@@ -832,7 +830,6 @@
+@@ -832,7 +831,6 @@
return (ret);
}
@@ -53,7 +61,7 @@
ssize_t
send(int sock, const void *buf, size_t len, int flags)
{
-@@ -862,7 +859,6 @@
+@@ -862,7 +860,6 @@
return (ret);
}
@@ -61,19 +69,28 @@
ssize_t
sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *to,
-@@ -1005,7 +1001,11 @@
+@@ -1004,11 +1001,20 @@
+ }
#ifdef HAVE_SENDFILE
- ssize_t
+#ifdef __FreeBSD__
++int
+sendfile(int out_fd, int in_fd, off_t offset, size_t count, struct sf_hdtr *hdtr, off_t *sbytes, int flags)
+#else
+ ssize_t
sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
+#endif
{
size_t inbytes = count, outbytes = count, bytes;
++#ifdef __FreeBSD__
++ int ret = 0;
++#else
ssize_t ret = 0;
-@@ -1021,8 +1021,11 @@
++#endif
+
+ INIT;
+
+@@ -1021,8 +1027,11 @@
/* This is a slightly ugly hack. */
bytes = MIN(inbytes, outbytes);
if (bytes > 0)