summaryrefslogtreecommitdiffstats
path: root/ftp/twoftpd
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-03-12 22:27:30 +0000
committerpat <pat@FreeBSD.org>2002-03-12 22:27:30 +0000
commit4b3cfdcd94ac8806ed2b372395356c09930fad8f (patch)
tree3f0493b104729546c762e0cac471833400ea0387 /ftp/twoftpd
parentc23c6b49b21280a466450399a96850217bfb8c1b (diff)
downloadFreeBSD-ports-4b3cfdcd94ac8806ed2b372395356c09930fad8f.zip
FreeBSD-ports-4b3cfdcd94ac8806ed2b372395356c09930fad8f.tar.gz
Add patch to allow twoftpd compile again. There is no such socket level
SOL_TCP and sys/types.h should be included first. PR: 35826 Submitted by: maintainer
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 e1b302b..ad5808f 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 0000000..f79d2b7
--- /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 0000000..c905540
--- /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;
OpenPOWER on IntegriCloud