diff options
author | culot <culot@FreeBSD.org> | 2011-05-12 15:38:34 +0800 |
---|---|---|
committer | culot <culot@FreeBSD.org> | 2011-05-12 15:38:34 +0800 |
commit | 8becdaa6b78192aa4d443f9b551ec798088e4bd7 (patch) | |
tree | a5cea9ab0e27f172ce643d2b0edbf7c6fd325b16 /net | |
parent | aacf5e1b2089414dcdcd622bea617e76f45b2ada (diff) | |
download | freebsd-ports-graphics-8becdaa6b78192aa4d443f9b551ec798088e4bd7.tar.gz freebsd-ports-graphics-8becdaa6b78192aa4d443f9b551ec798088e4bd7.tar.zst freebsd-ports-graphics-8becdaa6b78192aa4d443f9b551ec798088e4bd7.zip |
- Fix compilation errors with libpcap installed from ports and warnings
with clang
PR: ports/156968
Submitted by: Marcin Cieslak <saper@saper.info> (maintainer)
Diffstat (limited to 'net')
-rw-r--r-- | net/wackamole/files/patch-alarm.c | 20 | ||||
-rw-r--r-- | net/wackamole/files/patch-config_gram.y | 11 | ||||
-rw-r--r-- | net/wackamole/files/patch-configuration.c | 11 | ||||
-rw-r--r-- | net/wackamole/files/patch-defines.h | 28 | ||||
-rw-r--r-- | net/wackamole/files/patch-wackamole.c | 20 |
5 files changed, 90 insertions, 0 deletions
diff --git a/net/wackamole/files/patch-alarm.c b/net/wackamole/files/patch-alarm.c new file mode 100644 index 00000000000..298786187c4 --- /dev/null +++ b/net/wackamole/files/patch-alarm.c @@ -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 --git a/net/wackamole/files/patch-config_gram.y b/net/wackamole/files/patch-config_gram.y new file mode 100644 index 00000000000..33165689d5b --- /dev/null +++ b/net/wackamole/files/patch-config_gram.y @@ -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 --git a/net/wackamole/files/patch-configuration.c b/net/wackamole/files/patch-configuration.c new file mode 100644 index 00000000000..0d12d3ef1ee --- /dev/null +++ b/net/wackamole/files/patch-configuration.c @@ -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 --git a/net/wackamole/files/patch-defines.h b/net/wackamole/files/patch-defines.h new file mode 100644 index 00000000000..11846f389a6 --- /dev/null +++ b/net/wackamole/files/patch-defines.h @@ -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 --git a/net/wackamole/files/patch-wackamole.c b/net/wackamole/files/patch-wackamole.c new file mode 100644 index 00000000000..b2d2b36e995 --- /dev/null +++ b/net/wackamole/files/patch-wackamole.c @@ -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)); + } |