hgbook / it / examples / mq.tarball.qinit.it

<!-- BEGIN mq.tarball.qinit -->
<screen><prompt>$</prompt> <userinput>cd netplug</userinput>
<prompt>$</prompt> <userinput>hg qinit</userinput>
<prompt>$</prompt> <userinput>hg qnew -m 'corregge un problema di assemblaggio con gcc 4' correzione-assemblaggio.patch</userinput>
<prompt>$</prompt> <userinput>perl -pi -e 's/int addr_len/socklen_t addr_len/' netlink.c</userinput>
<prompt>$</prompt> <userinput>hg qrefresh</userinput>
<prompt>$</prompt> <userinput>hg tip -p</userinput>
changeset:   1:5227ba4b6a8b
etichetta:   qtip
etichetta:   correzione-assemblaggio.patch
etichetta:   tip
etichetta:   qbase
utente:      Bryan O'Sullivan &lt;bos@serpentine.com&gt;
data:        Fri Jun 05 15:50:51 2009 +0000
sommario:    corregge un problema di assemblaggio con gcc 4

diff -r e709896f2959 -r 5227ba4b6a8b netlink.c
--- a/netlink.c	Fri Jun 05 15:50:49 2009 +0000
+++ b/netlink.c	Fri Jun 05 15:50:51 2009 +0000
@@ -275,7 +275,7 @@
         exit(1);
     }
 
-    int addr_len = sizeof(addr);
+    socklen_t addr_len = sizeof(addr);
 
     if (getsockname(fd, (struct sockaddr *) &amp;addr, &amp;addr_len) == -1) {
         do_log(LOG_ERR, "Could not get socket details: %m");

</screen>
<!-- END mq.tarball.qinit -->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.