summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorhe <he>2012-11-05 14:26:44 +0000
committerhe <he>2012-11-05 14:26:44 +0000
commit82d22735c20e3431d74275117c817120f5c82c38 (patch)
tree757f5193320c32e7efbf4fb7f5fd798c8bd47390 /net
parenta3777a0c75bea0d86b82222d646a543ff18a1e5b (diff)
downloadpkgsrc-82d22735c20e3431d74275117c817120f5c82c38.tar.gz
Extend the patch to src/getdata.c, so that the return value of
posix_fadvise() is checked instead of testing the value of errno after the function has been called. This should make this program work also on netbsd-5. Bump PKGREVISION.
Diffstat (limited to 'net')
-rw-r--r--net/dhcpd-pools/Makefile4
-rw-r--r--net/dhcpd-pools/distinfo4
-rw-r--r--net/dhcpd-pools/patches/patch-src_getdata.c40
3 files changed, 42 insertions, 6 deletions
diff --git a/net/dhcpd-pools/Makefile b/net/dhcpd-pools/Makefile
index cf5183c4152..b1af59e5b46 100644
--- a/net/dhcpd-pools/Makefile
+++ b/net/dhcpd-pools/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2012/10/23 17:18:16 asau Exp $
+# $NetBSD: Makefile,v 1.6 2012/11/05 14:26:44 he Exp $
DISTNAME= dhcpd-pools-2.16
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dhcpd-pools/}
diff --git a/net/dhcpd-pools/distinfo b/net/dhcpd-pools/distinfo
index bd160501738..d4b6b702949 100644
--- a/net/dhcpd-pools/distinfo
+++ b/net/dhcpd-pools/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.2 2011/07/20 07:03:53 adam Exp $
+$NetBSD: distinfo,v 1.3 2012/11/05 14:26:44 he Exp $
SHA1 (dhcpd-pools-2.16.tar.gz) = 747546172df1027a3ed743822b6593eb8d9a3c82
RMD160 (dhcpd-pools-2.16.tar.gz) = 646d172a5c6f1f2a5b7d800d732adbef248e8f21
Size (dhcpd-pools-2.16.tar.gz) = 367461 bytes
SHA1 (patch-src_dhcpd-pools.h) = 41fe0881bc3741189ea802337bab1ba4aaeeb9bc
-SHA1 (patch-src_getdata.c) = 66580946034e5c19257c449e1fb5e5e9daaaa319
+SHA1 (patch-src_getdata.c) = 4234ec99f8df193d56a2d818ff8951521a5c2a1d
diff --git a/net/dhcpd-pools/patches/patch-src_getdata.c b/net/dhcpd-pools/patches/patch-src_getdata.c
index a19e4293707..4d821014574 100644
--- a/net/dhcpd-pools/patches/patch-src_getdata.c
+++ b/net/dhcpd-pools/patches/patch-src_getdata.c
@@ -1,8 +1,9 @@
-$NetBSD: patch-src_getdata.c,v 1.1 2011/07/20 07:03:53 adam Exp $
+$NetBSD: patch-src_getdata.c,v 1.2 2012/11/05 14:26:44 he Exp $
Don't include features.h; move string.h to dhcpd-pools.h.
+Check return value of posix_fadvise(), not just whether errno != 0.
---- src/getdata.c.orig 2011-07-20 06:30:23.000000000 +0000
+--- src/getdata.c.orig 2011-07-10 22:30:00.000000000 +0000
+++ src/getdata.c
@@ -43,19 +43,12 @@ extern char *malloc();
#define EXIT_SUCCESS 0 /* Successful exit status. */
@@ -24,3 +25,38 @@ Don't include features.h; move string.h to dhcpd-pools.h.
#include <netinet/in.h>
#include <stddef.h>
#include <stdint.h>
+@@ -89,15 +82,13 @@ int parse_leases(void)
+ err(EXIT_FAILURE, "parse_leases: %s", config.dhcpdlease_file);
+ }
+ #ifdef POSIX_FADV_WILLNEED
+- posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_WILLNEED);
+- if (errno) {
++ if (posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_WILLNEED) != 0) {
+ err(EXIT_FAILURE, "parse_leases: fadvise %s",
+ config.dhcpdlease_file);
+ }
+ #endif /* POSIX_FADV_WILLNEED */
+ #ifdef POSIX_FADV_SEQUENTIAL
+- posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_SEQUENTIAL);
+- if (errno) {
++ if (posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_SEQUENTIAL) != 0) {
+ err(EXIT_FAILURE, "parse_leases: fadvise %s",
+ config.dhcpdlease_file);
+ }
+@@ -269,14 +260,12 @@ void parse_config(int is_include, char *
+ err(EXIT_FAILURE, "parse_config: %s", config_file);
+ }
+ #ifdef POSIX_FADV_WILLNEED
+- posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_WILLNEED);
+- if (errno) {
++ if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_WILLNEED) != 0) {
+ err(EXIT_FAILURE, "parse_config: fadvise %s", config_file);
+ }
+ #endif /* POSIX_FADV_WILLNEED */
+ #ifdef POSIX_FADV_SEQUENTIAL
+- posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL);
+- if (errno) {
++ if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL) != 0) {
+ err(EXIT_FAILURE, "parse_config: fadvise %s", config_file);
+ }
+ #endif /* POSIX_FADV_SEQUENTIAL */