summaryrefslogtreecommitdiff
path: root/ftp/oftpd
diff options
context:
space:
mode:
authorDaniel Harris <dannyboy@FreeBSD.org>2001-06-17 18:16:39 +0000
committerDaniel Harris <dannyboy@FreeBSD.org>2001-06-17 18:16:39 +0000
commitda13604c4941108e3e7addd9a2f2a9000f82c9ab (patch)
treed19dc2b4dc227df32d694ac63a06a933f0bd92fe /ftp/oftpd
parent- Add ${PTHREAD_LIBS} and ${PTHREAD_CFLAGS} to fix compile errors (diff)
Add patch to disable badly-working sendfile code.
PR: 28214 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=44124
Diffstat (limited to 'ftp/oftpd')
-rw-r--r--ftp/oftpd/Makefile1
-rw-r--r--ftp/oftpd/files/patch-ftp_session.c29
2 files changed, 30 insertions, 0 deletions
diff --git a/ftp/oftpd/Makefile b/ftp/oftpd/Makefile
index e7cacebc2c2e..b35d2223bcdc 100644
--- a/ftp/oftpd/Makefile
+++ b/ftp/oftpd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= oftpd
PORTVERSION= 0.3.6
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= http://www.time-travellers.org/oftpd/ \
http://www.freenix.no/~anders/
diff --git a/ftp/oftpd/files/patch-ftp_session.c b/ftp/oftpd/files/patch-ftp_session.c
new file mode 100644
index 000000000000..eba07d5dc461
--- /dev/null
+++ b/ftp/oftpd/files/patch-ftp_session.c
@@ -0,0 +1,29 @@
+--- src/ftp_session.c.orig Sun Jun 17 03:45:08 2001
++++ src/ftp_session.c Sun Jun 17 03:46:26 2001
+@@ -1165,7 +1165,7 @@
+ /* for sendfile(), we still have to use a loop to avoid
+ having our watchdog time us out on large files - it does
+ allow us to avoid an extra copy to/from user space */
+-#ifdef HAVE_SENDFILE
++/* #ifdef HAVE_SENDFILE
+ offset = f->file_offset;
+ file_size = stat_buf.st_size - offset;
+ while (offset < stat_buf.st_size) {
+@@ -1200,7 +1200,7 @@
+
+ watchdog_defer_watched(f->watched);
+ }
+-#else
++#else */
+ for (;;) {
+ read_ret = read(file_fd, buf, sizeof(buf));
+ if (read_ret == -1) {
+@@ -1219,7 +1219,7 @@
+
+ watchdog_defer_watched(f->watched);
+ }
+-#endif /* HAVE_SENDFILE */
++/* #endif */ /* HAVE_SENDFILE */
+ }
+
+ /* disconnect */