# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../socket/hotfix.patch # Copyright (C) 2009 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- diff -Nur socket-1.2p1/Makefile socket-1.2p1.new/Makefile --- socket-1.2p1/Makefile 1999-09-19 12:48:45.000000000 +0200 +++ socket-1.2p1.new/Makefile 2003-07-30 18:59:07.000000000 +0200 @@ -32,7 +32,7 @@ ### socket.1 in /usr/local/man/man1/socket.1 ### Make sure the target directories exist before doing a "make install". -INSTALLBASE = /usr/local +INSTALLBASE = $(prefix) INSTALLBINPATH = $(INSTALLBASE)/bin INSTALLBINMODE = 755 INSTALLMANPATH = $(INSTALLBASE)/man @@ -46,10 +46,10 @@ ### system: ### 4.4 BSD (tested on FreeBSD, but probably works for other BSDs) -SWITCHES = -DHAS_POSIX_SIGS -DHAS_SYS_SIGLIST -DHAS_SYS_ERRLIST +#SWITCHES = -DHAS_POSIX_SIGS -DHAS_SYS_SIGLIST -DHAS_SYS_ERRLIST ### Linux -#SWITCHES = -DHAS_POSIX_SIGS -DHAS_SYS_SIGLIST -DHAS_SYS_ERRLIST +SWITCHES = -DHAS_SYS_SIGLIST -DHAS_SYS_ERRLIST -D_GNU_SOURCE ### Solaris 2.6 and 7 with gcc #SWITCHES = -DHAS_POSIX_SIGS -DHAS_SYS_SIGLIST -DHAS_SYS_ERRLIST \ diff -Nur socket-1.2p1/socketp.c socket-1.2p1.new/socketp.c --- socket-1.2p1/socketp.c 1999-09-19 13:00:30.000000000 +0200 +++ socket-1.2p1.new/socketp.c 2003-07-30 18:14:15.000000000 +0200 @@ -105,7 +105,7 @@ } } - sa.sin_port = htons((u_short) port) ; + sa.sin_port = htons((u_int16_t) port) ; if ((s = socket(sa.sin_family, SOCK_STREAM, 0)) < 0) { /* get socket */ return -1 ;