From 7bfded42bed27da17e070f2c28d028c6004cdf03 Mon Sep 17 00:00:00 2001 From: recht Date: Fri, 23 Jan 2004 23:30:10 +0000 Subject: Fix build on NetBSD 1.6 where O_NOFOLLOW isn't available. Noted by Krister Walfridsson. --- security/destroy/distinfo | 4 +++- security/destroy/patches/patch-aa | 19 +++++++++++++++++++ security/destroy/patches/patch-ab | 15 +++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 security/destroy/patches/patch-aa create mode 100644 security/destroy/patches/patch-ab (limited to 'security') diff --git a/security/destroy/distinfo b/security/destroy/distinfo index 2d0b8a3dc93..e9dc01e8345 100644 --- a/security/destroy/distinfo +++ b/security/destroy/distinfo @@ -1,4 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2004/01/23 18:11:29 recht Exp $ +$NetBSD: distinfo,v 1.2 2004/01/23 23:30:10 recht Exp $ SHA1 (destroy-20030307.tar.gz) = a3a4e07f58b207cfc8d1b6110a40ad72762aaab4 Size (destroy-20030307.tar.gz) = 2590 bytes +SHA1 (patch-aa) = b70f9d6ea08d62767f5833adbf10c771be5a4148 +SHA1 (patch-ab) = 49fcc11b6df7b8d48cf5c6ebbcabf13f07ccf95e diff --git a/security/destroy/patches/patch-aa b/security/destroy/patches/patch-aa new file mode 100644 index 00000000000..a770e728425 --- /dev/null +++ b/security/destroy/patches/patch-aa @@ -0,0 +1,19 @@ +$NetBSD: patch-aa,v 1.1 2004/01/23 23:32:43 recht Exp $ + +--- Makefile.orig 2003-03-25 16:35:57.000000000 +0100 ++++ Makefile +@@ -13,12 +13,12 @@ COMMENT= A program to destroy fil + + INSTALL= /usr/bin/install -c -o root -g wheel + CC?= ${CC} +-CFLAGS+= -Wall -Werror ++CFLAGS?= ${CFLAGS} + RM?= ${RM} + STRIP?= ${STRIP} + + all: +- ${CC} -o ${PORTNAME} destroy.c ++ ${CC} ${CFLAGS} -o ${PORTNAME} destroy.c + + install: + ${INSTALL} ${PORTNAME} ${LOCALBASE}/bin/ diff --git a/security/destroy/patches/patch-ab b/security/destroy/patches/patch-ab new file mode 100644 index 00000000000..f139345c1ca --- /dev/null +++ b/security/destroy/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1 2004/01/23 23:32:43 recht Exp $ + +--- destroy.c.orig 2003-03-25 16:56:34.000000000 +0100 ++++ destroy.c +@@ -58,6 +58,10 @@ main(int argc, char *argv[]) { + char *buf; + char *devrand = "/dev/urandom"; + char *devzero = "/dev/zero"; ++ int mode = O_WRONLY | O_EXCL; ++#if defined(O_NOFOLLOW) ++ mode |= O_NOFOLLOW; ++#endif + + if(argc < 2) { + usage(); -- cgit v1.2.3