openbsd-ports/security/clamav/patches/patch-clamav_milter-clamav_milter_c
mbalmer 0963e86f43 Update to version 0.86.1 and add patches to fix problems on macppc (comparisons
that are always true due to char not being signed on this platform).

This update fixes a possible crash, see
http://sourceforge.net/project/shownotes.php?release_id=337279
for details.
2005-06-29 10:12:09 +00:00

21 lines
805 B
Plaintext

--- clamav-milter/clamav-milter.c.orig Thu Jun 23 22:03:06 2005
+++ clamav-milter/clamav-milter.c Wed Jun 29 11:00:23 2005
@@ -886,7 +886,7 @@ main(int argc, char **argv)
* uid == 0 for that
*/
on = 1;
- if(setsockopt(broadcastSock, SOL_SOCKET, SO_BROADCAST, (int *)&on, sizeof(on)) < 0) {
+ if(setsockopt(broadcastSock, SOL_SOCKET, 0, (int *)&on, sizeof(on)) < 0) {
perror("setsockopt");
return EX_UNAVAILABLE;
}
@@ -908,7 +908,7 @@ main(int argc, char **argv)
memset(&ifr, '\0', sizeof(struct ifreq));
strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1);
- if(setsockopt(broadcastSock, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) < 0) {
+ if(setsockopt(broadcastSock, SOL_SOCKET, 0, &ifr, sizeof(ifr)) < 0) {
perror(iface);
return EX_CONFIG;
}