diff options
author | Yen-Ming Lee <leeym@FreeBSD.org> | 2009-10-22 06:39:53 +0000 |
---|---|---|
committer | Yen-Ming Lee <leeym@FreeBSD.org> | 2009-10-22 06:39:53 +0000 |
commit | a442f2d52e9931899f46ecf6124eb7a9b0aa5302 (patch) | |
tree | a73641c2eb5ee88ceeac673d62ba8f56cbed0238 /net-mgmt/arpalert | |
parent | ba6476ec9babed0f2c197b1c2cf147d6f0f15ae3 (diff) |
Notes
Diffstat (limited to 'net-mgmt/arpalert')
-rw-r--r-- | net-mgmt/arpalert/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/arpalert/files/patch-arpalert.c | 30 |
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, ¤t_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; + + |