freebsd-ports/net/wackamole/files/patch-wackamole.c
Robert Clausecker 4d98b01b6f net/wackamole: Fix build on armv7
Jails may not have a bpf(4) device, but can still build with BPF.

 - fix the configure test for BPF detection
 - define LICENSE
 - fix two obvious bugs in the code

PR:		265561
Approved by:	maintainer timeout, >2 weeks
MFH:		2022Q3
2022-08-16 15:51:50 +01:00

20 lines
742 B
C

--- wackamole.c.orig 2014-05-06 22:24:08 UTC
+++ wackamole.c
@@ -911,7 +911,7 @@ static void Acquire( entry *VE )
wack_alarm(PRINT, "%d %s", __LINE__, if_error());
else {
char buffer[16];
- snprintf(buffer, 16, inet_ntoa(iface.ipaddr));
+ snprintf(buffer, 16, "%s", inet_ntoa(iface.ipaddr));
wack_alarm(PRINT, " UP: %s:%s/%s",
iface.ifname,buffer,inet_ntoa(iface.netmask));
}
@@ -954,7 +954,7 @@ static void Release( entry *VE )
}
} else {
char buffer[16];
- snprintf(buffer, 16, inet_ntoa(idown.ipaddr));
+ snprintf(buffer, 16, "%s", inet_ntoa(idown.ipaddr));
wack_alarm(PRINT, "DOWN: %s:%s/%s",
idown.ifname,buffer,inet_ntoa(idown.netmask));
}