1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

- Fix build on 64-bits architectures

- Adopt maintainship

Approved by:	miwi (mentor)
This commit is contained in:
Pietro Cerutti 2008-04-21 17:36:40 +00:00
parent ca00daa9c7
commit f16579ce28
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=211726
2 changed files with 29 additions and 12 deletions

View File

@ -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

View File

@ -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)