Port to Solaris and correct network header inclusion.

Fri, 09 Jan 2009 00:46:33 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 09 Jan 2009 00:46:33 +0100
changeset 53
11a94c8e617e
parent 52
d42d557c7a5a
child 54
f012bbb2a542

Port to Solaris and correct network header inclusion.

stun/stun.patch file | annotate | diff | comparison | revisions
stun/stun.spec file | annotate | diff | comparison | revisions
     1.1 --- a/stun/stun.patch	Fri Jan 09 00:45:56 2009 +0100
     1.2 +++ b/stun/stun.patch	Fri Jan 09 00:46:33 2009 +0100
     1.3 @@ -83,3 +83,15 @@
     1.4         StunServerInfo info;
     1.5         bool ok = stunInitServer(info, myAddr, altAddr, myMediaPort, verbose);
     1.6         
     1.7 +Index: stun.cxx
     1.8 +diff -Nau stund.orig/stun.cxx stund/stun.cxx
     1.9 +--- stun.cxx.orig	2005-08-14 02:39:03.000000000 +0200
    1.10 ++++ stun.cxx	2009-01-09 00:23:08.069498590 +0100
    1.11 +@@ -16,6 +16,7 @@
    1.12 + #include <string.h>
    1.13 + #include <sys/ioctl.h>
    1.14 + #include <sys/socket.h>
    1.15 ++#include <sys/sockio.h>
    1.16 + #include <sys/time.h>
    1.17 + #include <sys/types.h> 
    1.18 + #include <arpa/inet.h>
     2.1 --- a/stun/stun.spec	Fri Jan 09 00:45:56 2009 +0100
     2.2 +++ b/stun/stun.spec	Fri Jan 09 00:46:33 2009 +0100
     2.3 @@ -36,7 +36,7 @@
     2.4  Group:        VoIP
     2.5  License:      Open Source
     2.6  Version:      %{V_opkg}
     2.7 -Release:      20080101
     2.8 +Release:      20090106
     2.9  
    2.10  #   list of sources
    2.11  Source0:      http://switch.dl.sourceforge.net/stun/stund_%{V_dist}.tgz
    2.12 @@ -73,12 +73,24 @@
    2.13  %prep
    2.14      %setup -q -n stund
    2.15      %patch -p0
    2.16 +    case "%{l_platform -t}" in
    2.17 +        *-sunos* )
    2.18 +            %{l_shtool} subst \
    2.19 +                -e 's;^\(LDFLAGS\)+=.*;\1=;' \
    2.20 +                -e 's;^#\(LDFLAGS+=\) -lnsl -lsocket;\1-lsocket -lnsl;' \
    2.21 +                Makefile
    2.22 +            ;;
    2.23 +        * )
    2.24 +            %{l_shtool} subst \
    2.25 +                -e 's;^\(LDFLAGS\)+=.*;\1=;' \
    2.26 +                Makefile
    2.27 +            ;;
    2.28 +    esac
    2.29  
    2.30  %build
    2.31      %{l_make} %{l_mflags} \
    2.32          CXX="%{l_cxx}" \
    2.33 -        CXXFLAGS="%{l_cxxflags -O}" \
    2.34 -        LDFLAGS=""
    2.35 +        CXXFLAGS="%{l_cxxflags -O}"
    2.36  
    2.37  %install
    2.38      rm -rf $RPM_BUILD_ROOT

mercurial