diff --git a/dhcping/dhcping.patch b/dhcping/dhcping.patch new file mode 100644 index 0000000000..d979896378 --- /dev/null +++ b/dhcping/dhcping.patch @@ -0,0 +1,13 @@ +--- dhcping.c.org Tue Feb 11 15:45:12 2003 ++++ dhcping.c Wed Feb 12 09:58:14 2003 +@@ -40,6 +40,10 @@ + #include + #include + ++#ifdef NEED_SOCKLEN_T ++ typedef size_t socklen_t; ++#endif ++ + #include "dhcp_options.h" + + #define BUF_SIZ 256*256 diff --git a/dhcping/dhcping.spec b/dhcping/dhcping.spec index 24b6a18aaa..befba81156 100644 --- a/dhcping/dhcping.spec +++ b/dhcping/dhcping.spec @@ -37,6 +37,7 @@ Release: 20020820 # list of sources Source0: http://www.mavetju.org/download/dhcping-%{version}.tar.gz +Patch0: dhcping.patch # build information Prefix: %{l_prefix} @@ -52,10 +53,16 @@ AutoReqProv: no %prep %setup -q + %patch -p0 %build + defs="" + case "%{l_target}" in + *-solaris2.6* ) defs="-DNEED_SOCKLEN_T" ;; + *-irix* ) defs="-DNEED_SOCKLEN_T";; + esac CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" \ + CFLAGS="%{l_cflags -O} $defs" \ ./configure \ --prefix=%{l_prefix} %{l_make} %{l_mflags -O}