summaryrefslogtreecommitdiffstats
path: root/ftp/oftpd
diff options
context:
space:
mode:
authordannyboy <dannyboy@FreeBSD.org>2001-06-17 18:16:39 +0000
committerdannyboy <dannyboy@FreeBSD.org>2001-06-17 18:16:39 +0000
commit408b3ce8ad648bac317d5433eb0f3092ed83e9d5 (patch)
tree6cf720bedc0ceb31b8ae687b00720bf27d55dcbb /ftp/oftpd
parentd528506d2ef9fadd61611a2384bf3844b3b16f9b (diff)
downloadFreeBSD-ports-408b3ce8ad648bac317d5433eb0f3092ed83e9d5.zip
FreeBSD-ports-408b3ce8ad648bac317d5433eb0f3092ed83e9d5.tar.gz
Add patch to disable badly-working sendfile code.
PR: 28214 Submitted by: maintainer
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 e7caceb..b35d222 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 0000000..eba07d5
--- /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 */
OpenPOWER on IntegriCloud