From 2b41d0da2010055cf10f6aac534a187af27b49d6 Mon Sep 17 00:00:00 2001 From: mortimer Date: Thu, 21 Jan 2021 00:16:37 +0000 Subject: Rearrange variables in dump / restore to handle -fno-common. Largely following the commit by mckusick in FreeBSD. ok naddy@ --- sbin/restore/restore.h | 4 ++-- sbin/restore/tape.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sbin/restore') diff --git a/sbin/restore/restore.h b/sbin/restore/restore.h index 714830e9a3c..2420d9e18ae 100644 --- a/sbin/restore/restore.h +++ b/sbin/restore/restore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: restore.h,v 1.9 2017/01/21 08:31:44 krw Exp $ */ +/* $OpenBSD: restore.h,v 1.10 2021/01/21 00:16:36 mortimer Exp $ */ /* $NetBSD: restore.h,v 1.8 1997/07/01 05:37:54 lukem Exp $ */ /* @@ -104,7 +104,7 @@ struct entry { /* * The entry describes the next file available on the tape */ -struct context { +extern struct context { short action; /* action being taken on this file */ mode_t mode; /* mode of file */ ino_t ino; /* inumber of file */ diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 324ec6378d8..0e2c693cd2a 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.51 2019/06/28 13:32:46 deraadt Exp $ */ +/* $OpenBSD: tape.c,v 1.52 2021/01/21 00:16:36 mortimer Exp $ */ /* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */ /* @@ -78,6 +78,8 @@ static char *map; static char lnkbuf[PATH_MAX + 1]; static size_t pathlen; +struct context curfile; /* describes next file available on the tape */ +union u_spcl u_spcl; /* mapping of variables in a control block */ int oldinofmt; /* old inode format conversion required */ int Bcvt; /* Swap Bytes (for CCI or sun) */ -- cgit v1.2.3