<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[63051] trunk/dports/comms/slirp</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.macports.org/changeset/63051">63051</a></dd>
<dt>Author</dt> <dd>landonf@macports.org</dd>
<dt>Date</dt> <dd>2010-01-24 11:29:31 -0800 (Sun, 24 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update to slirp 1.0.17. (Upstream) bugs remain with the 64-bit build</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportscommsslirpPortfile">trunk/dports/comms/slirp/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportscommsslirpfilesdebianslirp_10173diff">trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff</a></li>
<li><a href="#trunkdportscommsslirpfilesfix17patch">trunk/dports/comms/slirp/files/fix17.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportscommsslirpPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/comms/slirp/Portfile (63050 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/Portfile        2010-01-24 19:25:44 UTC (rev 63050)
+++ trunk/dports/comms/slirp/Portfile        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -1,9 +1,10 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> 
</span><span class="cx"> PortSystem 1.0
</span><ins>+PortGroup muniversal 1.0
</ins><span class="cx"> 
</span><span class="cx"> name                        slirp
</span><del>-version                        1.0.16
</del><ins>+version                        1.0.17
</ins><span class="cx"> categories                comms
</span><span class="cx"> platforms                darwin
</span><span class="cx"> maintainers                nomaintainer
</span><span class="lines">@@ -14,10 +15,21 @@
</span><span class="cx">                                         your Palm Pilot over the Internet via your Unix box.
</span><span class="cx"> 
</span><span class="cx"> homepage                http://slirp.sourceforge.net/
</span><del>-master_sites        sourceforge
</del><ins>+
+# No distfile is available for slirp-1.0.17 -- the update is distributed as a
+# patch
+distname                ${name}-1.0.16
+worksrcdir                ${distname}
+master_sites                sourceforge
</ins><span class="cx"> checksums                md5 b712f2fe58aaf87172cfd31c95fc1e31
</span><del>-patchfiles                patch-Makefile.in
</del><span class="cx"> 
</span><ins>+# Include both the 1.0.17 update and Debian's fixes for compiler warnings
+# and LP64. The Debian maintainer submitted his changes upstream, but no
+# response from the slirp maintainer was forthcoming.
+patchfiles                patch-Makefile.in \
+                        fix17.patch \
+                        debian-slirp_1.0.17-3.diff
+
</ins><span class="cx"> worksrcdir                ${worksrcdir}/src
</span><span class="cx"> 
</span><span class="cx"> post-destroot        {
</span></span></pre></div>
<a id="trunkdportscommsslirpfilesdebianslirp_10173diff"></a>
<div class="addfile"><h4>Added: trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff (0 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff                                (rev 0)
+++ trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -0,0 +1,467 @@
</span><ins>+--- slirp.man
++++ slirp.man
+@@ -1,4 +1,4 @@
+-.TH SLIRP 1 &quot;9 Jan 1996&quot; &quot;Version 1.0b&quot;
++.TH SLIRP 1 &quot;8 Jan 2006&quot; &quot;Version 1.0.17&quot;
+ .\&quot; Start displayed text macro
+ .de DS

+@@ -58,7 +58,7 @@
+ second gap between each. This will disconnect Slirp from your shell's
+ terminal and put Slirp in the background. Later, you can type
+ .DS
+-    slirp -l 0
++    slirp \-l 0
+ .DE
+ to &quot;reconnect&quot; Slirp again.
+ .PP
+@@ -93,29 +93,29 @@
+ (Notice the quotes, they ARE significant).  The reverse is also true.  E.g.,
+ if you run slirp as:
+ .DS
+-    slirp -P -b 14400
++    slirp \-P \-b 14400
+ .DE
+ you can create your .slirprc file too look like the following:
+ .DS
+-    -P
+-    -b 14400
++    \-P
++    \-b 14400
+ .DE
+ (Notice that only ONE command per line is allowed in configuration files).
+ The 2 types of options can also be mixed. For example:
+ .DS
+     In .slirprc:
+-        -P
+-        -b 14400
++        \-P
++        \-b 14400
+         redir 5022 21

+     Command line:
+-        slirp -P -b 14400 &quot;redir 5022 21&quot;
++        slirp \-P \-b 14400 &quot;redir 5022 21&quot;
+ .DE
+ Note that on the command line, any command/option that does not begin
+ with a '-' or '+', and has spaces in it, MUST be enclosed in quotes.
+ E.g., The following are all legal:
+ .DS
+-    slirp -P &quot;redir udp 5022 25&quot; -vj -b 14400
++    slirp \-P &quot;redir udp 5022 25&quot; \-vj \-b 14400
+     slirp &quot;ppp&quot; &quot;baudrate 14400&quot;
+     slirp ppp &quot;baudrate 14400&quot;
+ .DE
+@@ -125,9 +125,9 @@
+ The following are NOT legal:
+ .DS
+     slirp baudrate 14400
+-    slirp &quot;-b 14400&quot;
++    slirp &quot;\-b 14400&quot;
+ .DE
+-(Because &quot;-b&quot; starts with a '-' you must NOT enclose it in quotes.)
++(Because &quot;\-b&quot; starts with a '-' you must NOT enclose it in quotes.)
+ Easy, eh?
+ .PP
+ Note: Whenever Slirp expects an IP address as an argument (E.g., in
+@@ -149,8 +149,8 @@
+ A few notes on configuration:
+ .RS 2
+ .IP * 2
+-You should have &quot;ppp&quot; or &quot;-P&quot; before any PPP options (because when
+-Slirp parses -P or ppp, it will initialize all related fields, hence
++You should have &quot;ppp&quot; or &quot;\-P&quot; before any PPP options (because when
++Slirp parses \-P or ppp, it will initialize all related fields, hence
+ clearing anything that was parsed before it).
+ .IP * 2
+ Upon startup, the configuration is done in this order:
+@@ -164,9 +164,9 @@
+ .RE
+ .IP \  2
+ This is important because, for example, if you have &quot;initiate-options&quot;
+-(a PPP option) in ~/.slirprc-0, and you run slirp with -P,
+-&quot;initiate-options&quot; will not be valid, because -P will clear the fact
+-that you want options initiated by Slirp (remember, -P should always
++(a PPP option) in ~/.slirprc-0, and you run slirp with \-P,
++&quot;initiate-options&quot; will not be valid, because \-P will clear the fact
++that you want options initiated by Slirp (remember, \-P should always
+ come before any PPP options).
+ .RE
+ .SH &quot;COMMANDS AND OPTIONS&quot;
+@@ -202,7 +202,7 @@
+ .br
+ Usable: anywhere
+ .br
+-Command-line: -X
++Command-line: \-X
+ .br
+ Options:
+ .RS 2
+@@ -287,7 +287,7 @@
+ .br
+ Usable: anywhere
+ .br
+-Command-line: -b
++Command-line: \-b
+ .PP
+ Example: baudrate 14400
+ .PP
+@@ -433,8 +433,8 @@
+ wipes out the session, whereas &quot;close N&quot; closes it properly, as a good
+ little tcpip-emulator should :)
+ .PP        
+-&quot;kill -1&quot; shouldn't be used, it will kill the first session it finds
+-with -1, which usually is the command-line connection.
++&quot;kill \-1&quot; shouldn't be used, it will kill the first session it finds
++with \-1, which usually is the command-line connection.
+ .RE
+ .IP &quot;close N&quot;
+ .RS 4
+@@ -792,9 +792,9 @@
+ If your PPP software is unable to escape these characters, or you're
+ using (C)SLIP (which must have an 8bit clean link), your best bet is to
+ try and make the link 8bit clean.  For example, on some systems you can
+-give telnet the -8 flag to make the link 8bit, and -E to stop it from
+-interpreting the ^] character.  Similarly for rlogin; -8 to make the
+-link 8bit, -E to stop rlogin from interpreting the ~ character.  You
++give telnet the \-8 flag to make the link 8bit, and \-E to stop it from
++interpreting the ^] character.  Similarly for rlogin; \-8 to make the
++link 8bit, \-E to stop rlogin from interpreting the ~ character.  You
+ should look at the telnet and rlogin manual pages (&quot;man telnet&quot; and
+ &quot;man rlogin&quot; respectively) to see if your telnet/rlogin has similar
+ options. 
+@@ -815,7 +815,7 @@
+ Now, when you telnet to the host you wish to run the X programs from,
+ you should do as Slirp suggest above; type either of the two commands,
+ depending on which shell you are using.  You could also run the X
+-program as &quot;xprog -display IP.ADDRESS:X.Y&quot; as printed above.
++program as &quot;xprog \-display IP.ADDRESS:X.Y&quot; as printed above.
+ .IP     
+ If you missed what Slirp displayed on startup, you can telnet to
+ 10.0.2.0 and give Slirp the command &quot;show X&quot;, and the above will be
+@@ -886,13 +886,13 @@
+ with the following information:
+ .RS 2
+ .IP * 2
+-Output of the command &quot;uname -a&quot; on the remote system;
++Output of the command &quot;uname \-a&quot; on the remote system;
+ .IP * 2
+ Operating System name and version you run on your PC;
+ .IP * 2
+ Version of Slirp you are using (IMPORTANT!!!);
+ .IP * 2
+-If you managed to get Slirp running, run Slirp as &quot;slirp -S&quot; then try
++If you managed to get Slirp running, run Slirp as &quot;slirp \-S&quot; then try
+ whatever failed.  When you exit Slirp, you should have a file called
+ &quot;slirp_stats&quot;.  Send me this file; and
+ .IP * 2
+--- ppp.c
++++ ppp.c
+@@ -40,6 +40,7 @@
+ #include &lt;syslog.h&gt;
+ #include &lt;utmp.h&gt;
+ #include &lt;pwd.h&gt;
++#include &lt;ctype.h&gt;

+ #include &lt;sys/param.h&gt;
+ #include &lt;sys/types.h&gt;
+--- udp.c
++++ udp.c
+@@ -371,7 +371,7 @@
+         struct mbuf *m;
+ {
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(addr);
++        socklen_t addrlen = sizeof(addr);
+ #ifdef EMULATE_TALK
+         CTL_MSG_OLD *omsg;
+         CTL_MSG *nmsg;
+@@ -596,7 +596,7 @@
+ {
+         struct sockaddr_in addr;
+         struct socket *so;
+-        int addrlen = sizeof(struct sockaddr_in), opt = 1;
++        socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1;
+         
+         if ((so = socreate()) == NULL) {
+                 free(so);
+--- tcp_subr.c
++++ tcp_subr.c
+@@ -463,7 +463,7 @@
+ {
+         struct socket *so;
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(struct sockaddr_in);
++        socklen_t addrlen = sizeof(struct sockaddr_in);
+         struct tcpcb *tp;
+         int s, opt;

+@@ -658,7 +658,7 @@
+                 {
+                         struct socket *tmpso;
+                         struct sockaddr_in addr;
+-                        int addrlen = sizeof(struct sockaddr_in);
++                        socklen_t addrlen = sizeof(struct sockaddr_in);
+                         struct sbuf *so_rcv = &amp;so-&gt;so_rcv;
+                         
+                         memcpy(so_rcv-&gt;sb_wptr, m-&gt;m_data, m-&gt;m_len);
+--- Makefile.in
++++ Makefile.in
+@@ -209,3 +209,4 @@
+ .c.o: $(COMMON_H)
+         $(CC) $(CFLAGS) -c $&lt; -o $@

++nothing:
+--- main.c
++++ main.c
+@@ -9,6 +9,7 @@
+ #define WANT_SYS_IOCTL_H
+ #define WANT_TERMIOS_H
+ #include &lt;slirp.h&gt;
++#include &lt;ctype.h&gt;
+ #include &quot;main.h&quot;

+ struct timeval tt;
+@@ -237,7 +242,7 @@

+         /* It's an internet socket */
+         if (sscanf(*argv, &quot;%d,%[^:]:%d,%s&quot;, &amp;unit, hn, &amp;port, pwd) != 4) {
+-          lprint(&quot;Error: bad arguements to -l\n&quot;);
++          lprint(&quot;Error: bad arguments to -l\n&quot;);
+           slirp_exit(1);
+         }
+         if (strcmp(pwd, &quot;-&quot;) == 0) {
+@@ -990,10 +995,10 @@
+                 char *device = dev;
+ #ifndef NO_UNIX_SOCKETS
+                 struct sockaddr_un sock_un;
+-                int sock_len = sizeof(struct sockaddr_un);
++                socklen_t sock_len = sizeof(struct sockaddr_un);
+ #endif
+                 struct sockaddr_in sock_in;
+-                int sock_len2 = sizeof(struct sockaddr_in);
++                socklen_t sock_len2 = sizeof(struct sockaddr_in);

+                 fd = -1;
+                 if (slirp_socket_passwd)
+@@ -1029,7 +1034,7 @@
+                         sleep(1);
+                         if (read(fd, buff, 256) &lt; 0) {
+                                 /* Nuke both connections */
+-                                sprintf(buff, &quot;0 Connection timed out&quot;);
++                                snprintf(buff, sizeof(buff), &quot;0 Connection timed out&quot;);
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1041,7 +1046,7 @@

+                 if (sscanf(buff, &quot;%d %d %256s&quot;, &amp;unit, &amp;pid, device) == 3) {
+                         if (unit &gt;= MAX_INTERFACES || unit &lt; 0) {
+-                                sprintf(buff, &quot;0 Unit out of range (must be between 0 and %d, inclusive)&quot;, MAX_INTERFACES-1);
++                                snprintf(buff, sizeof(buff), &quot;0 Unit out of range (must be between 0 and %d, inclusive)&quot;, MAX_INTERFACES-1);
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1052,7 +1057,7 @@
+                          * (pid is invalid) */
+                         if (slirp_socket_passwd) {
+                                 if (strcmp(slirp_socket_passwd, device) != 0) {
+-                                        sprintf(buff, &quot;0 Incorrect password&quot;);
++                                        snprintf(buff, sizeof(buff), &quot;0 Incorrect password&quot;);
+                                         write(fd, buff, strlen(buff)+1);
+                                         slirp_socket_wait = curtime;
+                                         close(fd);
+@@ -1076,7 +1081,7 @@
+                          * failure, 1 for exit, and message is printed
+                          */
+                         if (ttyp) {
+-                                sprintf(buff, &quot;0 Unit already attached&quot;);
++                                snprintf(buff, sizeof(buff), &quot;0 Unit already attached&quot;);
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1090,7 +1095,7 @@
+                                    strcpy(buff2, &quot;PPP&quot;);
+                                 else
+ #endif
+-                                   sprintf(buff2, &quot;SLIP, MTU %d, MRU %d&quot;, if_mtu, if_mru);
++                                   snprintf(buff2, sizeof(buff2), &quot;SLIP, MTU %d, MRU %d&quot;, if_mtu, if_mru);
+ #ifndef FULL_BOLT
+                                 snprintf(buff, sizeof(buff),
+                                         &quot;1 Attached as unit %d, device %s\r\n\r\n[talking %s, %d baud]\r\n\r\nSLiRP Ready ...&quot;,
+@@ -1111,7 +1116,7 @@
+                                         ttyp-&gt;fd = fd;
+                                 }
+                         } else {
+-                                sprintf(buff, &quot;0 %s&quot;, strerror(errno));
++                                snprintf(buff, sizeof(buff), &quot;0 %s&quot;, strerror(errno));
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+--- mbuf.h
++++ mbuf.h
+@@ -132,6 +132,6 @@
+ extern struct        mbstat mbstat;
+ extern int mbuf_alloced;
+ extern struct mbuf m_freelist, m_usedlist;
+-extern mbuf_max;
++extern int mbuf_max;

+ #endif
+--- misc.c
++++ misc.c
+@@ -298,7 +298,7 @@
+ {
+         int s;
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(addr);
++        socklen_t addrlen = sizeof(addr);
+         int opt;
+         int master;
+         char *argv[256];
+@@ -403,7 +403,7 @@
+                   {
+                           char buff[256];
+                           
+-                          sprintf(buff, &quot;Error: execvp of %s failed: %s\n&quot;, 
++                          snprintf(buff, sizeof(buff), &quot;Error: execvp of %s failed: %s\n&quot;, 
+                                   argv[0], strerror(errno));
+                           write(2, buff, strlen(buff)+1);
+                   }
+@@ -490,7 +490,7 @@
+                 if (connect(s, (struct sockaddr *)&amp;sock_un,
+                               sizeof(sock_un.sun_family) + sizeof(sock_un.sun_path)) != 0)
+                    slirp_exit(1);
+-                sprintf(buff, &quot;kill none:%d&quot;, slirp_socket_unit);
++                snprintf(buff, sizeof(buff), &quot;kill none:%d&quot;, slirp_socket_unit);
+                 write(s, buff, strlen(buff)+1);
+         }
+ #endif
+@@ -917,7 +917,7 @@
+            
+            /* Ooops, failed, let's tell the user why */
+            
+-           sprintf(buff, &quot;Error: execlp of %s failed: %s\n&quot;, 
++           snprintf(buff, sizeof(buff), &quot;Error: execlp of %s failed: %s\n&quot;, 
+                    &quot;rsh&quot;, strerror(errno));
+            write(2, buff, strlen(buff)+1);
+            close(0); close(1); close(2); /* XXX */
+--- options.c
++++ options.c
+@@ -27,6 +27,8 @@
+ #define GIDSET_TYPE        int
+ #endif

++#include &lt;ctype.h&gt;
++
+ void readable _P((int fd));

+ /*
+--- ttys.c
++++ ttys.c
+@@ -11,6 +11,8 @@
+ #endif
+ #include &lt;slirp.h&gt;

++void lcp_lowerdown(int unit);
++
+ struct ttys *ttys_unit[MAX_INTERFACES];

+ int slirp_forked;
+@@ -92,9 +94,9 @@

+         /* Config the new tty */
+         if ((bptr = (char *)getenv(&quot;HOME&quot;)))
+-           sprintf(buff, &quot;%s/.slirprc-%d&quot;, bptr, unit);
++           snprintf(buff, sizeof(buff), &quot;%s/.slirprc-%d&quot;, bptr, unit);
+         else
+-           sprintf(buff, &quot;.slirprc-%d&quot;, unit);
++           snprintf(buff, sizeof(buff), &quot;.slirprc-%d&quot;, unit);
+         config(buff, ttyp-&gt;unit);

+         return ttyp;
+--- tcp_output.c
++++ tcp_output.c
+@@ -592,7 +592,7 @@
+ tcp_setpersist(tp)
+         register struct tcpcb *tp;
+ {
+-        register t = ((tp-&gt;t_srtt &gt;&gt; 2) + tp-&gt;t_rttvar) &gt;&gt; 1;
++        register int t = ((tp-&gt;t_srtt &gt;&gt; 2) + tp-&gt;t_rttvar) &gt;&gt; 1;

+ /*        if (tp-&gt;t_timer[TCPT_REXMT])
+  *                panic(&quot;tcp_output REXMT&quot;);
+--- socket.c
++++ socket.c
+@@ -377,7 +377,7 @@
+         struct socket *so;
+ {
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(struct sockaddr_in);
++        socklen_t addrlen = sizeof(struct sockaddr_in);
+         
+         DEBUG_CALL(&quot;sorecvfrom&quot;);
+         DEBUG_ARG(&quot;so = %lx&quot;, (long)so);
+@@ -530,7 +530,8 @@
+ {
+         struct sockaddr_in addr;
+         struct socket *so;
+-        int s, addrlen = sizeof(addr), opt = 1;
++        int s, opt = 1;
++        socklen_t addrlen = sizeof(addr);

+         DEBUG_CALL(&quot;solisten&quot;);
+         DEBUG_ARG(&quot;port = %d&quot;, port);
+--- ppp/ccp.c
++++ ppp/ccp.c
+@@ -464,7 +464,7 @@

+         if (newret == CONFNAK &amp;&amp; dont_nak)
+             newret = CONFREJ;
+-        if (!(newret == CONFACK || newret == CONFNAK &amp;&amp; ret == CONFREJ)) {
++        if (!(newret == CONFACK || (newret == CONFNAK &amp;&amp; ret == CONFREJ))) {
+             /* we're returning this option */
+             if (newret == CONFREJ &amp;&amp; ret == CONFNAK)
+                 retp = p0;
+--- ppp/lcp.c
++++ ppp/lcp.c
+@@ -39,6 +39,7 @@
+ #include &quot;chap.h&quot;
+ #include &quot;upap.h&quot;
+ #include &quot;ipcp.h&quot;
++#include &quot;ccp.h&quot;

+ /* global vars */
+ fsm lcp_fsm[NUM_PPP];                        /* LCP fsm structure (global)*/
+--- ppp/ppp.h
++++ ppp/ppp.h
+@@ -54,4 +54,18 @@

+ void print_string _P((char *, int, void (*) _P((void *, char *, ...)), void *));

++int bad_ip_adrs(u_int32_t addr);
++void novm __P((char *));
++void auth_peer_fail(int unit, int protocol);
++void auth_withpeer_fail(int unit, int protocol);
++void auth_peer_success(int unit, int protocol);
++void auth_withpeer_success(int unit, int protocol);
++int auth_ip_addr(int unit, u_int32_t addr);
++void link_established(int unit);
++void link_down(int unit);
++void link_required(int unit);
++void link_terminated(int unit);
++void check_auth_options();
++void check_access(FILE *f, char *filename);
++
+ #endif /* __PPP_H__ */
+--- ppp/ipcp.c
++++ ppp/ipcp.c
+@@ -568,7 +568,7 @@
+             no.neg_vj = 1;
+             break;
+         case CI_ADDRS:
+-            if (go-&gt;neg_addr &amp;&amp; go-&gt;old_addrs || no.old_addrs
++            if ((go-&gt;neg_addr &amp;&amp; go-&gt;old_addrs) || no.old_addrs
+                 || cilen != CILEN_ADDRS)
+                 goto bad;
+             try.neg_addr = 1;
</ins></span></pre></div>
<a id="trunkdportscommsslirpfilesfix17patch"></a>
<div class="addfile"><h4>Added: trunk/dports/comms/slirp/files/fix17.patch (0 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/files/fix17.patch                                (rev 0)
+++ trunk/dports/comms/slirp/files/fix17.patch        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+diff -u -r debug.c debug.c
+--- debug.c        2004-09-07 11:50:01.000000000 +1000
++++ debug.c        2005-11-01 10:45:27.865300800 +1100
+@@ -98,7 +98,9 @@
+                ttyp-&gt;proto==PROTO_PPP?&quot;PPP&quot;:
+ #endif
+                &quot;SLIP&quot;), buff);
++#ifndef FULL_BOLT
+         lprint(&quot;  %d baudrate\r\n&quot;, ttyp-&gt;baud);
++#endif
+         lprint(&quot;  interface is %s\r\n&quot;, ttyp-&gt;up?&quot;up&quot;:&quot;down&quot;);
+         lprint(&quot;  using fd %d, guardian pid is %d\r\n&quot;, ttyp-&gt;fd, ttyp-&gt;pid);
+ #ifndef FULL_BOLT
+diff -u -r main.c main.c
+--- main.c        2004-09-07 12:25:39.000000000 +1000
++++ main.c        2005-11-27 22:13:00.651928000 +1100
+@@ -602,10 +602,32 @@
+      keep it open.

+      Mainly for testing purposes, nice to be able to do fprintf(stderr...
++
++     Includes Tim Watt's ttyname() fixes (modified)
++
+   */

+   {
+   int blnKeepErr, blnKeepStdOut;
++  const char *ttyname_0_dup = 0;
++  const char *ttyname_1_dup = 0;
++  const char *ttyname_2_dup = 0;
++
++#define dup_ttyname(n) \
++  if( (ttyname_##n##_dup = ttyname(n)) ) { \
++    ttyname_##n##_dup = strdup(ttyname_##n##_dup); \
++  }
++
++#define clr_ttyname(n) \
++  if( (ttyname_##n##_dup) ) { \
++    free((char *) ttyname_##n##_dup); \
++    ttyname_##n##_dup = 0; \
++  }
++
++  dup_ttyname(0)
++  dup_ttyname(1)
++  dup_ttyname(2)
++

+   /* stderr going elsewhere ?? */
+   blnKeepErr = FALSE;
+@@ -613,26 +635,32 @@
+   if(!isatty(2))
+     blnKeepErr = TRUE;
+   else {
+-    if((slirp_tty == NULL &amp;&amp; strcmp(ttyname(0), ttyname(2)) == 0) ||
+-       (slirp_tty != NULL &amp;&amp; strcmp(ttyname(2), slirp_tty) == 0) )
++    if((slirp_tty == NULL &amp;&amp; ttyname_0_dup &amp;&amp; ttyname_2_dup &amp;&amp; strcmp(ttyname_0_dup, ttyname_2_dup) == 0) ||
++       (slirp_tty != NULL &amp;&amp; ttyname_2_dup &amp;&amp; strcmp(ttyname_2_dup, slirp_tty) == 0) )
+         blnKeepErr = FALSE;
+     else
+         blnKeepErr = TRUE;
+     }

+-
+   /* stdout going elsewhere ?? */
+   blnKeepStdOut = FALSE;
+   if(!isatty(1))
+     blnKeepStdOut = TRUE;
+   else {
+-    if((slirp_tty == NULL &amp;&amp; strcmp(ttyname(0), ttyname(1)) == 0) ||
+-       (slirp_tty != NULL &amp;&amp; strcmp(ttyname(1), slirp_tty) == 0) )
++    if((slirp_tty == NULL &amp;&amp; ttyname_0_dup &amp;&amp; ttyname_1_dup &amp;&amp; strcmp(ttyname_0_dup, ttyname_1_dup) == 0) ||
++       (slirp_tty != NULL &amp;&amp; ttyname_1_dup &amp;&amp; strcmp(ttyname_1_dup, slirp_tty) == 0) )
+         blnKeepStdOut = FALSE;
+     else
+         blnKeepStdOut = TRUE;
+     }

++  clr_ttyname(0);
++  clr_ttyname(1);
++  clr_ttyname(2);
++
++#undef dup_ttyname
++#undef clr_ttyname
++
+   i = open(&quot;/dev/null&quot;, O_RDWR);

+   if(!blnKeepStdOut)
+@@ -1068,7 +1096,7 @@
+                                         &quot;1 Attached as unit %d, device %s\r\n\r\n[talking %s, %d baud]\r\n\r\nSLiRP Ready ...&quot;,
+                                         unit, device?device:&quot;(socket)&quot;, buff2, ttyp-&gt;baud);
+ #else
+-                                snprintf(buff, sizeof(buff)
++                               snprintf(buff, sizeof(buff),
+                                         &quot;1 Attached as unit %d, device %s\r\n\r\n[talking %s]\r\n\r\nSLiRP Ready ...&quot;,
+                                         unit, device, buff2);
+ #endif
+diff -u -r main.h main.h
+--- main.h        2004-09-01 17:36:45.000000000 +1000
++++ main.h        2005-11-01 11:03:21.288808000 +1100
+@@ -5,6 +5,12 @@
+  * terms and conditions of the copyright.
+  */

++#define TRUE 1
++#define FALSE 0
++
++#include &lt;sys/types.h&gt;
++#include &lt;unistd.h&gt;
++
+ #ifdef HAVE_SYS_SELECT_H
+ #include &lt;sys/select.h&gt;
+ #endif
+diff -u -r mbuf.c mbuf.c
+--- mbuf.c        2004-09-01 17:36:43.000000000 +1000
++++ mbuf.c        2006-01-08 12:00:20.843576000 +1100
+@@ -146,18 +146,19 @@
+         struct mbuf *m;
+         int size;
+ {
++       int datasize;
++
+         /* some compiles throw up on gotos.  This one we can fake. */
+         if(m-&gt;m_size&gt;size) return;

+         if (m-&gt;m_flags &amp; M_EXT) {
+-          /* datasize = m-&gt;m_data - m-&gt;m_ext; */
++         datasize = m-&gt;m_data - m-&gt;m_ext;
+           m-&gt;m_ext = (char *)realloc(m-&gt;m_ext,size);
+ /*                if (m-&gt;m_ext == NULL)
+  *                        return (struct mbuf *)NULL;
+  */                
+-          /* m-&gt;m_data = m-&gt;m_ext + datasize; */
++         m-&gt;m_data = m-&gt;m_ext + datasize;
+         } else {
+-          int datasize;
+           char *dat;
+           datasize = m-&gt;m_data - m-&gt;m_dat;
+           dat = (char *)malloc(size);
+diff -u -r version.h version.h
+--- version.h        2004-09-01 19:44:35.000000000 +1000
++++ version.h        2006-01-08 13:11:55.989692800 +1100
+@@ -1,2 +1,2 @@
+-#define SLIRP_VERSION &quot;1.0.16&quot;
++#define SLIRP_VERSION &quot;1.0.17&quot;
+ #define SLIRP_STATUS &quot;BETA&quot;
</ins><span class="cx">Property changes on: trunk/dports/comms/slirp/files/fix17.patch
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
</div>

</body>
</html>