diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2024-09-30 15:56:09 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2024-09-30 23:59:21 +0000 |
commit | cc977a4b8b8bd932d57b86c55415328eb09e3647 (patch) | |
tree | 984e4f1f2a239c04b5b9b2874e9ce1a6f5fa6ae3 | |
parent | f2d04fb7c6879bd4c7d0ee6408b7892f7fcb505c (diff) | |
download | ports-cc977a4b8b8bd932d57b86c55415328eb09e3647.tar.gz ports-cc977a4b8b8bd932d57b86c55415328eb09e3647.zip |
sysutils/copytape: include errno.h for errno
errno must be accessed by a macro from errno.h.
Tidy includes and add unistd.h for read/write.
Consolidate patches for easy of maintenance.
This code is borderline useless and certainly broken with modern tape
sizes due to the use of ints for sizes.
PR: 281781
Approved by: sjroz@verizon.net (maintainer)
-rw-r--r-- | sysutils/copytape/Makefile | 2 | ||||
-rw-r--r-- | sysutils/copytape/files/patch-copytape.c (renamed from sysutils/copytape/files/patch-copytape.c_1) | 23 | ||||
-rw-r--r-- | sysutils/copytape/files/patch-copytape.c_2 | 11 |
3 files changed, 19 insertions, 17 deletions
diff --git a/sysutils/copytape/Makefile b/sysutils/copytape/Makefile index ede11c03c22a..c2ad2ab39f43 100644 --- a/sysutils/copytape/Makefile +++ b/sysutils/copytape/Makefile @@ -1,6 +1,6 @@ PORTNAME= copytape PORTVERSION= 1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= COMP_SOURCES/unix/volume10 DISTNAME= copytape diff --git a/sysutils/copytape/files/patch-copytape.c_1 b/sysutils/copytape/files/patch-copytape.c index 0be1bdc8d526..8dc9a0708c88 100644 --- a/sysutils/copytape/files/patch-copytape.c_1 +++ b/sysutils/copytape/files/patch-copytape.c @@ -1,15 +1,28 @@ ---- copytape.c.orig Fri Oct 23 17:23:06 1998 -+++ copytape.c Fri Oct 23 17:23:46 1998 -@@ -36,7 +36,7 @@ +--- copytape.c.orig ++++ copytape.c +@@ -28,15 +28,18 @@ + */ - extern int errno; + +-#include <stdio.h> + #include <sys/types.h> + #include <sys/ioctl.h> + #include <sys/mtio.h> + #include <sys/file.h> + +-extern int errno; ++#include <errno.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> -#define BUFLEN 262144 /* max tape block size */ +#define BUFLEN (1024*1024) /* max tape block size */ #define TAPE_MARK -100 /* return record length if we read a * tape mark */ #define END_OF_TAPE -101 /* 2 consecutive tape marks */ -@@ -149,7 +149,7 @@ +@@ -149,7 +152,7 @@ len = input(from); } while (len > 0); if (len == FORMAT_ERROR) { diff --git a/sysutils/copytape/files/patch-copytape.c_2 b/sysutils/copytape/files/patch-copytape.c_2 deleted file mode 100644 index 8838843a4939..000000000000 --- a/sysutils/copytape/files/patch-copytape.c_2 +++ /dev/null @@ -1,11 +0,0 @@ ---- copytape.c.orig 2013-10-16 06:54:00.000000000 -0400 -+++ copytape.c 2013-10-16 06:54:13.000000000 -0400 -@@ -29,6 +29,8 @@ - - - #include <stdio.h> -+#include <stdlib.h> -+#include <string.h> - #include <sys/types.h> - #include <sys/ioctl.h> - #include <sys/mtio.h> |