void-packages/srcpkgs/cvsps2/patches/inet_addr-64bit.patch

13 lines
404 B
Diff

Use INADDR_NONE instead of -1 to check inet_addr() result
--- a/cbtcommon/tcpsocket.c.1 2013-04-14 13:21:14.848464155 +0400
+++ b/cbtcommon/tcpsocket.c 2013-04-14 13:23:23.015136709 +0400
@@ -198,7 +198,7 @@
memcpy(dest, &ip.s_addr, sizeof(ip.s_addr));
}
#else
- if ( (*dest = inet_addr(addr_str)) != -1)
+ if ( (*dest = inet_addr(addr_str)) != INADDR_NONE)
{
/* nothing */
}