diff -Nur rpm.org/SOURCES/hwcrypto-osdef.patch rpm/SOURCES/hwcrypto-osdef.patch
--- rpm.org/SOURCES/hwcrypto-osdef.patch	1970-01-01 09:00:00.000000000 +0900
+++ rpm/SOURCES/hwcrypto-osdef.patch	2004-05-25 22:32:09.000000000 +0900
@@ -0,0 +1,17 @@
+--- Host/API/make.conf.org	2004-05-25 22:28:05.227498568 +0900
++++ Host/API/make.conf	2004-05-25 22:31:01.765660688 +0900
+@@ -180,6 +180,14 @@
+ 		cflags="-Wall -I../h  -I./h   -I../../common ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
+ 		ldflags="-shared -O-no-undefined -Wl,-soname=${TARGET}"
+ 	;;
++	#------------------------------
++	# Linux     2.6.*    gcc
++	#------------------------------
++	Linux:2.6.*:gcc)
++		TARGET="libaep.so.1"
++		cflags="-Wall -I../h  -I./h   -I../../common ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
++		ldflags="-shared -O-no-undefined -Wl,-soname=${TARGET}"
++	;;
+ 
+ 	#------------------------------
+ 	# Solaris   5.6     gcc
diff -Nur rpm.org/SOURCES/hwcrypto-osdef2.patch rpm/SOURCES/hwcrypto-osdef2.patch
--- rpm.org/SOURCES/hwcrypto-osdef2.patch	1970-01-01 09:00:00.000000000 +0900
+++ rpm/SOURCES/hwcrypto-osdef2.patch	2004-05-26 00:20:49.000000000 +0900
@@ -0,0 +1,17 @@
+--- Host/Daemon/make.conf.osdef	2004-05-26 00:18:43.191777392 +0900
++++ Host/Daemon/make.conf	2004-05-26 00:19:23.535644192 +0900
+@@ -183,6 +183,14 @@
+ 		cflags="-Wall -I../h  -I./h   -I../../common ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
+ 		ldflags="-lpthread -lnsl -lrt"
+ 	;;
++	#------------------------------
++	# Linux     2.6.*    gcc
++	#------------------------------
++	Linux:2.6.*:gcc)
++		TARGET="aepdaemon"
++		cflags="-Wall -I../h  -I./h   -I../../common ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
++		ldflags="-lpthread -lnsl -lrt"
++	;;
+ 
+ 	#------------------------------
+ 	# Solaris   5.6     gcc
diff -Nur rpm.org/SOURCES/hwcrypto-osdef3.patch rpm/SOURCES/hwcrypto-osdef3.patch
--- rpm.org/SOURCES/hwcrypto-osdef3.patch	1970-01-01 09:00:00.000000000 +0900
+++ rpm/SOURCES/hwcrypto-osdef3.patch	2004-05-26 00:27:02.000000000 +0900
@@ -0,0 +1,17 @@
+--- Host/Test/quicktest/make.conf.osdef	2004-05-26 00:25:03.673935312 +0900
++++ Host/Test/quicktest/make.conf	2004-05-26 00:26:24.075712384 +0900
+@@ -181,6 +181,14 @@
+                 cflags="-Wall -I./h -I../../h ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
+                 ldflags="-lpthread -lnsl -lrt -L. -L../../API -laep"
+         ;;
++        
++        #------------------------------
++        # Linux     2.6.*    gcc
++        #------------------------------
++        Linux:2.6.*:gcc)
++                cflags="-Wall -I./h -I../../h ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
++                ldflags="-lpthread -lnsl -lrt -L. -L../../API -laep"
++        ;;
+ 
+         #------------------------------
+         # Solaris   5.6     gcc
diff -Nur rpm.org/SOURCES/hwcrypto-osdef4.patch rpm/SOURCES/hwcrypto-osdef4.patch
--- rpm.org/SOURCES/hwcrypto-osdef4.patch	1970-01-01 09:00:00.000000000 +0900
+++ rpm/SOURCES/hwcrypto-osdef4.patch	2004-05-26 00:28:57.000000000 +0900
@@ -0,0 +1,17 @@
+--- Host/versionApp/make.conf.osdef	2004-05-26 00:27:56.920597816 +0900
++++ Host/versionApp/make.conf	2004-05-26 00:28:14.821876408 +0900
+@@ -182,6 +182,14 @@
+                 cflags=" -Wall -I../h -I./h ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
+                 ldflags="-lpthread -lnsl -lrt -L. -L../API -laep"
+         ;;
++        
++        #------------------------------
++        # Linux     2.6.*    gcc
++        #------------------------------
++        Linux:2.6.*:gcc)
++                cflags=" -Wall -I../h -I./h ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC"
++                ldflags="-lpthread -lnsl -lrt -L. -L../API -laep"
++        ;;
+ 
+         #------------------------------
+         # Solaris   5.6     gcc
diff -Nur rpm.org/SOURCES/hwcrypto-osdef5.patch rpm/SOURCES/hwcrypto-osdef5.patch
--- rpm.org/SOURCES/hwcrypto-osdef5.patch	1970-01-01 09:00:00.000000000 +0900
+++ rpm/SOURCES/hwcrypto-osdef5.patch	2004-05-26 00:32:02.000000000 +0900
@@ -0,0 +1,17 @@
+--- Host/aeploader/make.conf.osdef	2004-05-26 00:30:33.939727280 +0900
++++ Host/aeploader/make.conf	2004-05-26 00:30:51.244096616 +0900
+@@ -184,6 +184,14 @@
+ 		cflags="-Wall -I../h  -I../Daemon/h -I../API/h  -I../../common  ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC" 
+ 		ldflags="-lpthread -lnsl -lrt -L. -L../API -laep" 
+ 	;; 
++	 
++	#------------------------------ 
++	# Linux     2.6.*    gcc 
++	#------------------------------ 
++	Linux:2.6.*:gcc) 
++		cflags="-Wall -I../h  -I../Daemon/h -I../API/h  -I../../common  ${ENDIAN_FLAG} ${BITS_FLAG} -D_REENTRANT -fPIC" 
++		ldflags="-lpthread -lnsl -lrt -L. -L../API -laep" 
++	;; 
+  
+ 	#------------------------------ 
+ 	# Solaris   5.6     gcc 
diff -Nur rpm.org/SPECS/hwcrypto.spec rpm/SPECS/hwcrypto.spec
--- rpm.org/SPECS/hwcrypto.spec	2004-02-14 04:31:24.000000000 +0900
+++ rpm/SPECS/hwcrypto.spec	2004-05-26 00:32:23.000000000 +0900
@@ -18,6 +18,11 @@
 Patch1: aep1000-redhat.patch
 Patch2: bcm5820-1.81-link.patch
 Patch3: bcm5820-1.81-noclear.patch
+Patch4: hwcrypto-osdef.patch
+Patch5: hwcrypto-osdef2.patch
+Patch6: hwcrypto-osdef3.patch
+Patch7: hwcrypto-osdef4.patch
+Patch8: hwcrypto-osdef5.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-root 
 Obsoletes: bcm5820
 Prereq: /sbin/chkconfig, /sbin/service
@@ -44,6 +49,12 @@
 cp snmp/readme.txt snmp/readme.snmp
 popd
 
+%patch4 -p0 -b .osdef
+%patch5 -p0 -b .osdef
+%patch6 -p0 -b .osdef
+%patch7 -p0 -b .osdef
+%patch8 -p0 -b .osdef
+
 find -name "*.c" -o -name "*.h" | xargs chmod -x
 
 %build
