aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/arpalert
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2009-10-22 06:39:53 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2009-10-22 06:39:53 +0000
commita442f2d52e9931899f46ecf6124eb7a9b0aa5302 (patch)
treea73641c2eb5ee88ceeac673d62ba8f56cbed0238 /net-mgmt/arpalert
parentba6476ec9babed0f2c197b1c2cf147d6f0f15ae3 (diff)
downloadports-a442f2d52e9931899f46ecf6124eb7a9b0aa5302.tar.gz
ports-a442f2d52e9931899f46ecf6124eb7a9b0aa5302.zip
Notes
Diffstat (limited to 'net-mgmt/arpalert')
-rw-r--r--net-mgmt/arpalert/Makefile1
-rw-r--r--net-mgmt/arpalert/files/patch-arpalert.c30
2 files changed, 31 insertions, 0 deletions
diff --git a/net-mgmt/arpalert/Makefile b/net-mgmt/arpalert/Makefile
index 8bc7bf21929a..0652656f2d55 100644
--- a/net-mgmt/arpalert/Makefile
+++ b/net-mgmt/arpalert/Makefile
@@ -7,6 +7,7 @@
PORTNAME= arpalert
PORTVERSION= 2.0.11
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://www.arpalert.org/src/
diff --git a/net-mgmt/arpalert/files/patch-arpalert.c b/net-mgmt/arpalert/files/patch-arpalert.c
new file mode 100644
index 000000000000..352cee82b495
--- /dev/null
+++ b/net-mgmt/arpalert/files/patch-arpalert.c
@@ -0,0 +1,30 @@
+--- arpalert.c.orig 2008-04-01 03:36:42.000000000 +0900
++++ arpalert.c 2009-10-21 19:45:53.000000000 +0900
+@@ -179,6 +179,12 @@
+ if(cur_timeout.tv_sec != -1){
+ time_sous(&cur_timeout, &current_t, &timeout);
+
++ if (0 > timeout.tv_usec) {
++ /* avoid EINVAL (paranoid) */
++ timeout.tv_sec -= (timeout.tv_usec / 1000000) + 1;
++ timeout.tv_usec = (timeout.tv_usec % 1000000) + 1000000;
++ }
++
+ // prevent negative timeout
+ if(timeout.tv_sec < 0){
+ timeout.tv_usec = 0;
+@@ -188,6 +194,12 @@
+ timeout.tv_usec += 10000;
+ tmout = &timeout;
+
++ if (1000000 <= timeout.tv_usec) {
++ /* avoid EINVAL */
++ timeout.tv_sec += timeout.tv_usec / 1000000;
++ timeout.tv_usec %= 1000000;
++ }
++
+ // if no timeout
+ } else {
+ tmout = NULL;
+
+