stun/stun.patch

changeset 418
680c3f7768b0
parent 417
76ceb617f880
     1.1 --- a/stun/stun.patch	Fri Apr 13 17:49:04 2012 +0200
     1.2 +++ b/stun/stun.patch	Fri Apr 13 18:48:23 2012 +0200
     1.3 @@ -1,7 +1,16 @@
     1.4  Index: server.cxx
     1.5 +diff -Nau server.cxx.orig server.cxx
     1.6  --- server.cxx.orig	2005-08-13 22:19:29 +0200
     1.7  +++ server.cxx	2005-11-16 10:33:51 +0100
     1.8 -@@ -23,7 +23,7 @@
     1.9 +@@ -2,6 +2,7 @@
    1.10 + #include <cstring>
    1.11 + #include <iostream>
    1.12 + #include <cstdlib>   
    1.13 ++#include <cstdio>   
    1.14 + 
    1.15 + #ifndef WIN32
    1.16 + #include <sys/time.h>
    1.17 +@@ -23,7 +24,7 @@
    1.18   usage()
    1.19   {
    1.20      cerr << "Usage: " << endl
    1.21 @@ -10,7 +19,7 @@
    1.22           << " " << endl
    1.23           << " If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151, run this program with" << endl
    1.24           << "    ./server -v  -h 10.0.1.150 -a 10.0.1.151" << endl
    1.25 -@@ -32,7 +32,7 @@
    1.26 +@@ -32,7 +33,7 @@
    1.27           << "  -a sets the secondary IP" << endl
    1.28           << "  -p sets the primary port and defaults to 3478" << endl
    1.29           << "  -o sets the secondary port and defaults to 3479" << endl
    1.30 @@ -19,7 +28,7 @@
    1.31           << "  -m sets up a STERN server starting at port m" << endl
    1.32           << "  -v runs in verbose mode" << endl
    1.33         // in makefile too
    1.34 -@@ -55,6 +55,7 @@
    1.35 +@@ -55,6 +56,7 @@
    1.36      StunAddress4 altAddr;
    1.37      bool verbose=false;
    1.38      bool background=false;
    1.39 @@ -27,7 +36,7 @@
    1.40      
    1.41      myAddr.addr = 0;
    1.42      altAddr.addr = 0;
    1.43 -@@ -135,6 +136,16 @@
    1.44 +@@ -135,6 +137,16 @@
    1.45            }
    1.46            myMediaPort = UInt16(strtol( argv[arg], NULL, 10));
    1.47         }
    1.48 @@ -44,7 +53,7 @@
    1.49         else
    1.50         {
    1.51            usage();
    1.52 -@@ -213,6 +224,19 @@
    1.53 +@@ -213,6 +225,19 @@
    1.54   
    1.55      if (pid == 0) //child or not using background
    1.56      {
    1.57 @@ -65,14 +74,16 @@
    1.58         bool ok = stunInitServer(info, myAddr, altAddr, myMediaPort, verbose);
    1.59         
    1.60  Index: stun.cxx
    1.61 -diff -Nau stund.orig/stun.cxx stund/stun.cxx
    1.62 +diff -Nau stun.cxx.orig stun.cxx
    1.63  --- stun.cxx.orig	2005-08-14 02:39:03.000000000 +0200
    1.64  +++ stun.cxx	2009-01-09 00:23:08.069498590 +0100
    1.65 -@@ -16,6 +16,7 @@
    1.66 +@@ -16,6 +16,9 @@
    1.67   #include <string.h>
    1.68   #include <sys/ioctl.h>
    1.69   #include <sys/socket.h>
    1.70 ++#if defined (__SVR4) && defined (__sun)
    1.71  +#include <sys/sockio.h>
    1.72 ++#endif
    1.73   #include <sys/time.h>
    1.74   #include <sys/types.h> 
    1.75   #include <arpa/inet.h>

mercurial