summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordownsj <downsj@openbsd.org>1997-01-14 10:33:00 +0000
committerdownsj <downsj@openbsd.org>1997-01-14 10:33:00 +0000
commitf9f1bdfb1a1fd92c95568cbc383cd5a9af542a44 (patch)
treef59f5a74facfe8310c06e702e21280dc603c0802
parentUse <fcntl.h>, not <sys/file.h>. Approved by Bob Corbett. (diff)
downloadwireguard-openbsd-f9f1bdfb1a1fd92c95568cbc383cd5a9af542a44.tar.xz
wireguard-openbsd-f9f1bdfb1a1fd92c95568cbc383cd5a9af542a44.zip
hack: if we're M68K, also allow us to strip M68K4K. Works for me.
-rw-r--r--usr.bin/strip/strip.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/strip/strip.c b/usr.bin/strip/strip.c
index 21eba51746a..770fe4b8ab9 100644
--- a/usr.bin/strip/strip.c
+++ b/usr.bin/strip/strip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strip.c,v 1.4 1996/09/03 11:08:00 deraadt Exp $ */
+/* $OpenBSD: strip.c,v 1.5 1997/01/14 10:33:00 downsj Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)strip.c 5.8 (Berkeley) 11/6/91";*/
-static char rcsid[] = "$OpenBSD: strip.c,v 1.4 1996/09/03 11:08:00 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: strip.c,v 1.5 1997/01/14 10:33:00 downsj Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -114,7 +114,12 @@ main(argc, argv)
(void)close(fd);
ERROR(errno);
}
+#if (MID_MACHINE == MID_M68K)
+ if (N_BADMAG(*ep) || ((N_GETMID(*ep) != MID_MACHINE) &&
+ (N_GETMID(*ep) != MID_M68K4K))) {
+#else
if (N_BADMAG(*ep) || N_GETMID(*ep) != MID_MACHINE) {
+#endif
munmap((caddr_t)ep, sb.st_size);
(void)close(fd);
ERROR(EFTYPE);