diff --git a/libnet-1.1.3-backport.patch b/libnet-1.1.3-backport.patch new file mode 100644 index 0000000..1a6db7d --- /dev/null +++ b/libnet-1.1.3-backport.patch @@ -0,0 +1,126 @@ +Backport by Robert Scheck for libnet <= 1.1.3, which merges the +upstream fix for the HAVE_CONFIG_H issue from the not-yet released libnet 1.1.4 back. + +--- libnet-1.1.3/doc/html/libnet_8h-source.html 2009-05-12 02:22:06.000000000 +0200 ++++ libnet-1.1.4/doc/html/libnet_8h-source.html 2009-06-05 02:34:53.000000000 +0200 +@@ -80,7 +80,7 @@ + 00090 #include <winsock2.h> + 00091 #include <win32/in_systm.h> + 00092 #endif /* __WIN32__ */ +-00093 #if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) ++00093 #if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__) + 00094 #include <netinet/ip_var.h> + 00095 #else /* __linux__ */ + 00096 #if (HAVE_NET_ETHERNET_H) +--- libnet-1.1.3/doc/html/libnet-types_8h-source.html 2009-05-12 02:22:06.000000000 +0200 ++++ libnet-1.1.4/doc/html/libnet-types_8h-source.html 2009-06-05 02:34:53.000000000 +0200 +@@ -45,28 +45,21 @@ + 00032 #ifndef __LIBNET_TYPES_H + 00033 #define __LIBNET_TYPES_H + 00034 +-00035 #ifdef HAVE_CONFIG_H +-00036 #include "../config.h" +-00037 #endif +-00038 +-00039 /* Solaris has messed up POSIX nomenclature for int types */ +-00040 #if HAVE_SOLARIS +-00041 #include <inttypes.h> +-00042 #else +-00043 #include <stdint.h> ++00035 #if (__sun__ && __svr4__) ++00036 /* libnet should be using the standard type names, but in the short term ++00037 * define our non-standard type names in terms of the standard names. ++00038 */ ++00039 #include <inttypes.h> ++00040 typedef uint8_t u_int8_t; ++00041 typedef uint16_t u_int16_t; ++00042 typedef uint32_t u_int32_t; ++00043 typedef uint64_t u_int64_t; + 00044 #endif + 00045 +-00046 /* +-00047 typedef uint8_t u_int8_t; +-00048 typedef uint16_t u_int16_t; +-00049 typedef uint32_t u_int32_t; +-00050 typedef uint64_t u_int64_t; +-00051 */ +-00052 +-00053 #endif /* __LIBNET_TYPES_H */ +-00054 +-00055 /* EOF */ +-
Generated on Mon May 11 17:22:06 2009 for libnet by  ++00046 #endif /* __LIBNET_TYPES_H */ ++00047 ++00048 /* EOF */ ++
Generated on Thu Jun 4 17:34:53 2009 for libnet by  + + doxygen 1.5.3
+ +--- libnet-1.1.3/include/libnet/libnet-types.h 2009-04-29 00:53:25.000000000 +0200 ++++ libnet-1.1.4/include/libnet/libnet-types.h 2009-06-05 02:31:36.000000000 +0200 +@@ -32,23 +32,16 @@ + #ifndef __LIBNET_TYPES_H + #define __LIBNET_TYPES_H + +-#ifdef HAVE_CONFIG_H +-#include "../config.h" +-#endif +- +-/* Solaris has messed up POSIX nomenclature for int types */ +-#if HAVE_SOLARIS ++#if (__sun__ && __svr4__) ++/* libnet should be using the standard type names, but in the short term ++ * define our non-standard type names in terms of the standard names. ++ */ + #include +-#else +-#include +-#endif +- +-/* + typedef uint8_t u_int8_t; + typedef uint16_t u_int16_t; + typedef uint32_t u_int32_t; + typedef uint64_t u_int64_t; +-*/ ++#endif + + #endif /* __LIBNET_TYPES_H */ + +--- libnet-1.1.3/include/libnet.h 2009-05-12 02:21:33.000000000 +0200 ++++ libnet-1.1.4/include/libnet.h 2009-06-05 02:31:36.000000000 +0200 +@@ -90,7 +90,7 @@ + #include + #include + #endif /* __WIN32__ */ +-#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) ++#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__) + #include + #else /* __linux__ */ + #if (HAVE_NET_ETHERNET_H) +--- libnet-1.1.3/include/libnet.h.in 2009-03-31 02:39:14.000000000 +0200 ++++ libnet-1.1.4/include/libnet.h.in 2009-06-05 02:09:18.000000000 +0200 +@@ -90,7 +90,7 @@ + #include + #include + #endif /* __WIN32__ */ +-#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) ++#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__) + #include + #else /* __linux__ */ + #if (HAVE_NET_ETHERNET_H) +--- libnet-1.1.3/README 2009-05-01 02:12:24.000000000 +0200 ++++ libnet-1.1.4/README 2009-05-12 21:26:09.000000000 +0200 +@@ -5,9 +5,10 @@ + =============================================================================== + + +-libnet has become unmaintained at packetfactory, and it's maintainer is unreachable. ++libnet has become unmaintained at packetfactory.net, and it's author is unreachable. + +-This fork is a release of the 1.1.3 release candidate, bug fixed. ++This version was forked from the 1.1.3 release candidate, then bug fixed, ++actively maintained, and rereleased. + + Home page and more info is available at: + diff --git a/libnet.spec b/libnet.spec index d3fd54d..065a8dd 100644 --- a/libnet.spec +++ b/libnet.spec @@ -1,11 +1,12 @@ Summary: C library for portable packet creation and injection Name: libnet Version: 1.1.3 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: System Environment/Libraries URL: http://www.sourceforge.net/projects/libnet-dev/ Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz +Patch0: libnet-1.1.3-backport.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description @@ -29,6 +30,7 @@ and sample test code for more detailed information. %prep %setup -q +%patch0 -p1 # Keep the sample directory untouched by make rm -rf __dist_sample @@ -87,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/%{name}*.3* %changelog +* Sat Jun 06 2009 Robert Scheck 1.1.3-2 +- Added upstream patch to solve HAVE_CONFIG_H (#501633, #502400) + * Sat May 16 2009 Robert Scheck 1.1.3-1 - Upgrade to 1.1.3