Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2004 18:18:20 +0100
From:      "Petr Holub" <hopet@ics.muni.cz>
To:        <marcus@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   rtpmon patch
Message-ID:  <03b201c3f18c$367c0a00$2136fb93@kloboucek>

next in thread | raw e-mail | index | archive | help
Hi,

here's fairly trivial patch to get rtpmon compile on FreeBSD 5.2-RELEASE.
I hope it's sufficient and doesn't screw up anything.

BTW: I think you can unmark rat broken on FreeBSD 5.2-RELEASE. It compiles
fine for me and it seems to work quite well without any modification.

Cheers,
Petr

================================================================
                            Petr Holub
CESNET z.s.p.o.                       Supercomputing Center Brno
Zikova 4                             Institute of Compt. Science
162 00 Praha 6, CZ                            Masaryk University
Czech Republic                     Botanicka 68a, 60200 Brno, CZ
e-mail: Petr.Holub@cesnet.cz               phone: +420-549493944
                                             fax: +420-541212747
                                       e-mail: hopet@ics.muni.cz

Common subdirectories: rtpmon-1.0a7.orig/autom4te.cache and
rtpmon-1.0a7/autom4te.cache
diff -u rtpmon-1.0a7.orig/member.cc rtpmon-1.0a7/member.cc
--- rtpmon-1.0a7.orig/member.cc	Tue Feb 10 20:38:53 2004
+++ rtpmon-1.0a7/member.cc	Tue Feb 10 20:40:11 2004
@@ -116,12 +116,12 @@

 	    argv2[0] = "cname";
 	    s = sdes_[RTCP_SDES_CNAME];
-	    argv2[1] = s ? s : "?";
+	    argv2[1] = s ? s : (char *)"?";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "name";
 	    s = sdes_[RTCP_SDES_NAME];
-	    argv2[1] = s ? s : "?";
+	    argv2[1] = s ? s : (char *)"?";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "srcid";
@@ -137,27 +137,27 @@

 	    argv2[0] = "email";
 	    s = sdes_[RTCP_SDES_EMAIL];
-	    argv2[1] = s ? s : "";
+	    argv2[1] = s ? s : (char *)"";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "phone";
 	    s = sdes_[RTCP_SDES_PHONE];
-	    argv2[1] = s ? s : "";
+	    argv2[1] = s ? s : (char *)"";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "loc";
 	    s = sdes_[RTCP_SDES_LOC];
-	    argv2[1] = s ? s : "";
+	    argv2[1] = s ? s : (char *)"";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "tool";
 	    s = sdes_[RTCP_SDES_TOOL];
-	    argv2[1] = s ? s : "";
+	    argv2[1] = s ? s : (char *)"";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    argv2[0] = "note";
 	    s = sdes_[RTCP_SDES_NOTE];
-	    argv2[1] = s ? s : "";
+	    argv2[1] = s ? s : (char *)"";
 	    nargv[nargc++] = Tcl_Merge(2, argv2);

 	    strftime(wrk, sizeof(wrk), "%H:%M:%S", localtime(&ts_));
diff -u rtpmon-1.0a7.orig/net-ip.cc rtpmon-1.0a7/net-ip.cc
--- rtpmon-1.0a7.orig/net-ip.cc	Tue Feb 10 20:42:31 2004
+++ rtpmon-1.0a7/net-ip.cc	Tue Feb 10 20:43:03 2004
@@ -146,7 +146,7 @@
 {
 	memset((char *)p, 0, sizeof(*p));
 	p->sin_family = AF_INET;
-	int len = sizeof(*p);
+	socklen_t len = sizeof(*p);
 	if (getsockname(ssock_, (struct sockaddr *)p, &len) < 0) {
 		perror("getsockname");
 		p->sin_addr.s_addr = 0;
diff -u rtpmon-1.0a7.orig/net.cc rtpmon-1.0a7/net.cc
--- rtpmon-1.0a7.orig/net.cc	Tue Feb 10 20:40:36 2004
+++ rtpmon-1.0a7/net.cc	Tue Feb 10 20:42:15 2004
@@ -279,7 +279,7 @@
 {
     errno = 0;
 	sockaddr_in sfrom;
-	int fromlen = sizeof(sfrom);
+	socklen_t fromlen = sizeof(sfrom);
 	int cc = ::recvfrom(fd, (char*)buf, len, 0,
 			    (sockaddr*)&sfrom, &fromlen);
 	if (cc < 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03b201c3f18c$367c0a00$2136fb93>