File: 0002-Fix-FTBFS-with-gcc-3.4.patch

package info (click to toggle)
hfsutils 3.2.6-15
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,672 kB
  • sloc: ansic: 12,857; tcl: 1,937; makefile: 566; sh: 156; perl: 29
file content (127 lines) | stat: -rw-r--r-- 2,891 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
From: Andreas Jochens <aj@andaco.de>
Date: Sat, 23 Jan 2021 15:14:18 +0100
Subject: Fix FTBFS with gcc-3.4

---
 binhex.c          | 2 --
 copyin.c          | 2 --
 copyout.c         | 2 --
 hcwd.c            | 2 --
 hfsutil.h         | 2 +-
 libhfs/libhfs.h   | 2 +-
 librsrc/librsrc.h | 2 +-
 tclhfs.c          | 3 +--
 8 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/binhex.c b/binhex.c
index 50a9eeb..551b520 100644
--- a/binhex.c
+++ b/binhex.c
@@ -38,8 +38,6 @@ int dup(int);
 
 const char *bh_error = "no error";
 
-extern int errno;
-
 # define ERROR(code, str)	(bh_error = (str), errno = (code))
 
 static FILE *file;			/* input/output file */
diff --git a/copyin.c b/copyin.c
index 061f042..5dbd9c7 100644
--- a/copyin.c
+++ b/copyin.c
@@ -48,8 +48,6 @@ int dup(int);
 
 const char *cpi_error = "no error";
 
-extern int errno;
-
 # define ERROR(code, str)	(cpi_error = (str), errno = (code))
 
 # define MACB_BLOCKSZ	128
diff --git a/copyout.c b/copyout.c
index e2f6b4e..813823e 100644
--- a/copyout.c
+++ b/copyout.c
@@ -49,8 +49,6 @@ int dup(int);
 
 const char *cpo_error = "no error";
 
-extern int errno;
-
 # define ERROR(code, str)	(cpo_error = (str), errno = (code))
 
 # define MACB_BLOCKSZ	128
diff --git a/hcwd.c b/hcwd.c
index 4c9d181..807a1cf 100644
--- a/hcwd.c
+++ b/hcwd.c
@@ -43,8 +43,6 @@ static mountent *mounts = 0;
 static int mtabsz = 0, nmounts = 0;
 static int curvol = -1, dirty = 0;
 
-extern int errno;
-
 /*
  * NAME:	addent()
  * DESCRIPTION:	insert mount entry into table
diff --git a/hfsutil.h b/hfsutil.h
index 2ad42f7..fc4a7d8 100644
--- a/hfsutil.h
+++ b/hfsutil.h
@@ -19,7 +19,7 @@
  * $Id: hfsutil.h,v 1.8 1998/04/11 08:26:57 rob Exp $
  */
 
-extern int errno;
+#include <errno.h>
 
 # define ERROR(code, str)	(hfs_error = (str), errno = (code))
 
diff --git a/libhfs/libhfs.h b/libhfs/libhfs.h
index a8943cb..63d192d 100644
--- a/libhfs/libhfs.h
+++ b/libhfs/libhfs.h
@@ -22,7 +22,7 @@
 # include "hfs.h"
 # include "apple.h"
 
-extern int errno;
+#include <errno.h>
 
 # define ERROR(code, str)  \
     do { hfs_error = (str), errno = (code); goto fail; } while (0)
diff --git a/librsrc/librsrc.h b/librsrc/librsrc.h
index 2919010..956a4e2 100644
--- a/librsrc/librsrc.h
+++ b/librsrc/librsrc.h
@@ -21,7 +21,7 @@
 
 # include "rsrc.h"
 
-extern int errno;
+#include <errno.h>
 
 # define ERROR(code, str)  \
     do { rsrc_error = (str), errno = (code); goto fail; } while (0)
diff --git a/tclhfs.c b/tclhfs.c
index c6182f3..d678f43 100644
--- a/tclhfs.c
+++ b/tclhfs.c
@@ -29,6 +29,7 @@
 
 # include <stdio.h>
 # include <stdlib.h>
+# include <errno.h>
 # include <string.h>
 # include <ctype.h>
 # include <limits.h>
@@ -44,8 +45,6 @@
 # include "suid.h"
 # include "version.h"
 
-extern int errno;
-
 # define ERROR(code, str)	(hfs_error = (str), errno = (code))
 
 # define SIZE(type, n)		((size_t) (sizeof(type) * (n)))