ports/156968: [MAINTAINER] net/wackamole: fix compilation glitches and warnings
Marcin Cieslak
saper at saper.info
Thu May 12 01:10:10 UTC 2011
>Number: 156968
>Category: ports
>Synopsis: [MAINTAINER] net/wackamole: fix compilation glitches and warnings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu May 12 01:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Marcin Cieslak
>Release: FreeBSD 9.0-CURRENT amd64
>Organization:
http://saper.info
>Environment:
System: FreeBSD radziecki.saper.info 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r219785M: Mon Mar 21 11:40:40 CET
>Description:
Fix compilation error with devel/libpcap installed from ports
and warnings with clang
Added file(s):
- files/patch-alarm.c
- files/patch-config_gram.y
- files/patch-configuration.c
- files/patch-defines.h
- files/patch-wackamole.c
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- wackamole-2.1.4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/wackamole.orig/files/patch-alarm.c /usr/ports/net/wackamole/files/patch-alarm.c
--- /usr/ports/net/wackamole.orig/files/patch-alarm.c 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/net/wackamole/files/patch-alarm.c 2011-05-12 02:50:59.000000000 +0200
@@ -0,0 +1,20 @@
+--- alarm.c.orig 2011-05-12 02:48:08.000000000 +0200
++++ alarm.c 2011-05-12 02:48:40.000000000 +0200
+@@ -93,7 +93,7 @@
+ timestamp[length] = ' ';
+ #ifdef HAVE_SYSLOG_H
+ if(syslog_flag)
+- syslog(LOG_NOTICE, timestamp);
++ syslog(LOG_NOTICE, "%s", timestamp);
+ else
+ #endif
+ fwrite(timestamp, length+1, sizeof(char), stdout);
+@@ -105,7 +105,7 @@
+ int len = strlen(message)+100;
+ s = malloc(len);/*estimation*/
+ vsnprintf(s,len,message, ap);
+- syslog(LOG_NOTICE, s);
++ syslog(LOG_NOTICE, "%s", s);
+ free(s);
+ }
+ else
diff -ruN --exclude=CVS /usr/ports/net/wackamole.orig/files/patch-config_gram.y /usr/ports/net/wackamole/files/patch-config_gram.y
--- /usr/ports/net/wackamole.orig/files/patch-config_gram.y 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/net/wackamole/files/patch-config_gram.y 2011-05-12 02:55:33.000000000 +0200
@@ -0,0 +1,11 @@
+--- config_gram.y.orig 2011-05-12 02:54:26.000000000 +0200
++++ config_gram.y 2011-05-12 02:55:18.000000000 +0200
+@@ -106,7 +106,7 @@
+ SPIT("Setting Group: %s\n", Spread_group); }
+ | W_LOG W_EQUALS W_STRING
+ | W_CONTROL W_EQUALS W_STRING
+- { snprintf(control_socket, MAXPATHLEN, $3.string); }
++ { snprintf(control_socket, MAXPATHLEN, "%s", $3.string); }
+ | W_MATURE W_EQUALS W_TIMEINTERVAL
+ { Maturity_timeout.sec = $3.tv.tv_sec;
+ Maturity_timeout.usec = 0;
diff -ruN --exclude=CVS /usr/ports/net/wackamole.orig/files/patch-configuration.c /usr/ports/net/wackamole/files/patch-configuration.c
--- /usr/ports/net/wackamole.orig/files/patch-configuration.c 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/net/wackamole/files/patch-configuration.c 2011-05-12 02:56:18.000000000 +0200
@@ -0,0 +1,11 @@
+--- configuration.c.orig 2011-05-12 02:55:52.000000000 +0200
++++ configuration.c 2011-05-12 02:56:03.000000000 +0200
+@@ -43,7 +43,7 @@
+ char my_local_host_name[255];
+ static const size_t my_local_host_name_len=255;
+ struct hostent *hent;
+- int i, full;
++ int full;
+ Num_prefer = 0;
+
+ if (File_name && File_name[0] && (NULL != (fp = fopen(File_name,"r"))) )
diff -ruN --exclude=CVS /usr/ports/net/wackamole.orig/files/patch-defines.h /usr/ports/net/wackamole/files/patch-defines.h
--- /usr/ports/net/wackamole.orig/files/patch-defines.h 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/net/wackamole/files/patch-defines.h 2011-05-12 02:52:17.000000000 +0200
@@ -0,0 +1,28 @@
+--- defines.h.orig 2005-03-30 21:56:58.000000000 +0200
++++ defines.h 2011-05-12 02:51:55.000000000 +0200
+@@ -13,6 +13,9 @@
+ #ifdef HAVE_STRINGS_H
+ #include <strings.h>
+ #endif
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
+ #ifdef HAVE_ERRNO_H
+ #include <errno.h>
+ #endif
+@@ -59,12 +62,12 @@
+ #ifdef HAVE_NET_ROUTE_H
+ #include <net/route.h>
+ #endif
+-#ifdef HAVE_PCAP_H
+-#include <pcap.h>
+-#endif
+ #ifdef HAVE_NET_BPF_H
+ #include <net/bpf.h>
+ #endif
++#ifdef HAVE_PCAP_H
++#include <pcap.h>
++#endif
+ #ifdef HAVE_NET_ETHERNET_H
+ #include <net/ethernet.h>
+ #endif
diff -ruN --exclude=CVS /usr/ports/net/wackamole.orig/files/patch-wackamole.c /usr/ports/net/wackamole/files/patch-wackamole.c
--- /usr/ports/net/wackamole.orig/files/patch-wackamole.c 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/net/wackamole/files/patch-wackamole.c 2011-05-12 02:51:29.000000000 +0200
@@ -0,0 +1,20 @@
+--- wackamole.c.orig 2011-05-12 02:43:02.000000000 +0200
++++ wackamole.c 2011-05-12 02:46:20.000000000 +0200
+@@ -911,7 +911,7 @@
+ 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 @@
+ }
+ } 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));
+ }
--- wackamole-2.1.4.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list