aboutsummaryrefslogtreecommitdiff
path: root/ftp/twoftpd
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2002-03-12 22:27:30 +0000
committerPatrick Li <pat@FreeBSD.org>2002-03-12 22:27:30 +0000
commit279d53c494b82226f98485797ed9ba0ab91e8603 (patch)
tree64af09ba1cec9942ae1f39c3c885e8adbc60604c /ftp/twoftpd
parent77350df861ee57dac986501d73c6eae08bd6b3dd (diff)
downloadports-279d53c494b82226f98485797ed9ba0ab91e8603.tar.gz
ports-279d53c494b82226f98485797ed9ba0ab91e8603.zip
Notes
Diffstat (limited to 'ftp/twoftpd')
-rw-r--r--ftp/twoftpd/Makefile1
-rw-r--r--ftp/twoftpd/files/patch-socket::cork.c26
-rw-r--r--ftp/twoftpd/files/patch-socket::uncork.c29
3 files changed, 56 insertions, 0 deletions
diff --git a/ftp/twoftpd/Makefile b/ftp/twoftpd/Makefile
index e1b302bea970..ad5808f9abb1 100644
--- a/ftp/twoftpd/Makefile
+++ b/ftp/twoftpd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= twoftpd
PORTVERSION= 1.14
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= http://untroubled.org/twoftpd/
diff --git a/ftp/twoftpd/files/patch-socket::cork.c b/ftp/twoftpd/files/patch-socket::cork.c
new file mode 100644
index 000000000000..f79d2b7b031e
--- /dev/null
+++ b/ftp/twoftpd/files/patch-socket::cork.c
@@ -0,0 +1,26 @@
+--- socket/cork.c.orig Wed Mar 13 02:00:20 2002
++++ socket/cork.c Wed Mar 13 02:01:45 2002
+@@ -15,9 +15,9 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include "socket.h"
+
+@@ -25,10 +25,10 @@
+ {
+ #if defined(TCP_CORK)
+ int flag = 1;
+- return setsockopt(sock, SOL_TCP, TCP_CORK, &flag, sizeof flag) == 0;
++ return setsockopt(sock, SOL_SOCKET, TCP_CORK, &flag, sizeof flag) == 0;
+ #elif defined(TCP_NOPUSH)
+ int flag = 1;
+- return setsockopt(sock, SOL_TCP, TCP_NOPUSH, &flag, sizeof flag) == 0;
++ return setsockopt(sock, SOL_SOCKET, TCP_NOPUSH, &flag, sizeof flag) == 0;
+ #else
+ return 1;
+ #endif
diff --git a/ftp/twoftpd/files/patch-socket::uncork.c b/ftp/twoftpd/files/patch-socket::uncork.c
new file mode 100644
index 000000000000..c905540d0ff6
--- /dev/null
+++ b/ftp/twoftpd/files/patch-socket::uncork.c
@@ -0,0 +1,29 @@
+--- socket/uncork.c.orig Wed Mar 13 02:02:05 2002
++++ socket/uncork.c Wed Mar 13 02:02:35 2002
+@@ -15,9 +15,9 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include "socket.h"
+
+@@ -25,13 +25,13 @@
+ {
+ #if defined(TCP_CORK)
+ int flag = 0;
+- return setsockopt(sock, SOL_TCP, TCP_CORK, &flag, sizeof flag) == 0;
++ return setsockopt(sock, SOL_SOCKET, TCP_CORK, &flag, sizeof flag) == 0;
+ #elif defined(TCP_NOPUSH)
+ /* BSD's TCP_NOPUSH option only takes effect after a write/send.
+ * Hopefully this extra write will cause the TCP stack to send out
+ * any buffered writes. */
+ int flag = 0;
+- if (setsockopt(sock, SOL_TCP, TCP_NOPUSH, &flag, sizeof flag) != 0) return 0;
++ if (setsockopt(sock, SOL_SOCKET, TCP_NOPUSH, &flag, sizeof flag) != 0) return 0;
+ return write(sock, &flag, 0) == 0;
+ #else
+ return 1;