diff options
author | pat <pat@FreeBSD.org> | 2002-03-13 06:27:30 +0800 |
---|---|---|
committer | pat <pat@FreeBSD.org> | 2002-03-13 06:27:30 +0800 |
commit | 4b3cfdcd94ac8806ed2b372395356c09930fad8f (patch) | |
tree | 3f0493b104729546c762e0cac471833400ea0387 /ftp | |
parent | c23c6b49b21280a466450399a96850217bfb8c1b (diff) | |
download | freebsd-ports-gnome-4b3cfdcd94ac8806ed2b372395356c09930fad8f.tar.gz freebsd-ports-gnome-4b3cfdcd94ac8806ed2b372395356c09930fad8f.tar.zst freebsd-ports-gnome-4b3cfdcd94ac8806ed2b372395356c09930fad8f.zip |
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')
-rw-r--r-- | ftp/twoftpd/Makefile | 1 | ||||
-rw-r--r-- | ftp/twoftpd/files/patch-socket::cork.c | 26 | ||||
-rw-r--r-- | ftp/twoftpd/files/patch-socket::uncork.c | 29 |
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; |