# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
# 
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
# 
# ROCK Linux: rock-src/package/esden/socket/hotfix.patch
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
# 
# This program is free software; you can redistribute it and/or modify
# it 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. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
# 
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
# 
# --- ROCK-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
 
 ### 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 ;