Source

hgbook / ja / examples / mq.tarball.qinit.out

$ \textbf{cd netplug}
$ \textbf{hg qinit}
$ \textbf{hg qnew -m 'fix build problem with gcc 4' build-fix.patch}
$ \textbf{perl -pi -e 's/int addr_len/socklen_t addr_len/' netlink.c}
$ \textbf{hg qrefresh}
$ \textbf{hg tip -p}
changeset:   
tag:         qtip
tag:         build-fix.patch
tag:         tip
tag:         qbase
user:        Bryan O'Sullivan <bos@serpentine.com>

summary:     fix build problem with gcc 4

diff -r  -r  netlink.c


@@ -275,7 +275,7 @@ netlink_open(void)
         exit(1);
     \}
 
-    int addr_len = sizeof(addr);
+    socklen_t addr_len = sizeof(addr);
 
     if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) \{
         do_log(LOG_ERR, "Could not get socket details: %m");