forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
castor-2.1.9.8-fix-gcc47.patch
133 lines (119 loc) · 3.77 KB
/
castor-2.1.9.8-fix-gcc47.patch
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
128
129
130
131
132
133
diff --git a/castor/server/BaseDaemon.cpp b/castor/server/BaseDaemon.cpp
index b844e39..c593f25 100644
--- a/castor/server/BaseDaemon.cpp
+++ b/castor/server/BaseDaemon.cpp
@@ -39,6 +39,7 @@
#include <iostream>
#include <iomanip>
#include <vector>
+#include <unistd.h>
//------------------------------------------------------------------------------
diff --git a/castor/server/Queue.cpp b/castor/server/Queue.cpp
index 4f5c251..74ad3a8 100644
--- a/castor/server/Queue.cpp
+++ b/castor/server/Queue.cpp
@@ -24,6 +24,7 @@
// Include files
#include "castor/server/Queue.hpp"
+#include <unistd.h>
//-----------------------------------------------------------------------------
diff --git a/castor/server/SignalThreadPool.cpp b/castor/server/SignalThreadPool.cpp
index f6ad184..2a1f59e 100644
--- a/castor/server/SignalThreadPool.cpp
+++ b/castor/server/SignalThreadPool.cpp
@@ -28,6 +28,7 @@
#include "castor/server/SignalThreadPool.hpp"
#include "castor/exception/Internal.hpp"
#include <sys/time.h>
+#include <unistd.h>
extern "C" {
char* getconfent (const char *, const char *, int);
diff --git a/common/Cthread.c b/common/Cthread.c
index 2972d42..20555bf 100644
--- a/common/Cthread.c
+++ b/common/Cthread.c
@@ -16,6 +16,7 @@
#include <osdep.h>
#include <signal.h>
#include <string.h>
+#include <unistd.h>
#ifdef DEBUG
#ifndef CTHREAD_DEBUG
diff --git a/h/Cthread_flags.h b/h/Cthread_flags.h
index 46a2b43..9d7dd8e 100644
--- a/h/Cthread_flags.h
+++ b/h/Cthread_flags.h
@@ -160,11 +160,11 @@
#endif /* ifdef _CTHREAD */
#include <stdlib.h> /* malloc, etc... */
#ifndef _WIN32
-#include <unistd.h> /* fork usleep... */
#include <sys/time.h> /* gettimeofday */
#endif /* ifndef _WIN32 */
#include <errno.h> /* errno ... */
#include <string.h> /* strerror ... */
+#include <unistd.h>
#endif /* __Cthread_flags_h */
diff --git a/test/common/Cpool_ext_multiple_pools.c b/test/common/Cpool_ext_multiple_pools.c
index b19117f..ae67d7a 100644
--- a/test/common/Cpool_ext_multiple_pools.c
+++ b/test/common/Cpool_ext_multiple_pools.c
@@ -4,9 +4,7 @@
#include <serrno.h>
#include <log.h>
#include <osdep.h>
-#ifndef _WIN32
#include <unistd.h>
-#endif
void *master_thread (void *);
void *testit (void *);
diff --git a/test/common/Cpool_forevertest.c b/test/common/Cpool_forevertest.c
index 7a2c0e6..271a3b9 100644
--- a/test/common/Cpool_forevertest.c
+++ b/test/common/Cpool_forevertest.c
@@ -8,6 +8,7 @@
#include <unistd.h>
#endif
#include <time.h>
+#include <unistd.h>
void *master_thread (void *);
void *testit (void *);
diff --git a/test/common/Cpool_multiple_pools.c b/test/common/Cpool_multiple_pools.c
index 93d7af8..5f8b369 100644
--- a/test/common/Cpool_multiple_pools.c
+++ b/test/common/Cpool_multiple_pools.c
@@ -4,9 +4,7 @@
#include <serrno.h>
#include <log.h>
#include <osdep.h>
-#ifndef _WIN32
#include <unistd.h>
-#endif
void *master_thread (void *);
void *testit (void *);
diff --git a/test/common/Csched_test.c b/test/common/Csched_test.c
index 8a8af0e..a052aed 100644
--- a/test/common/Csched_test.c
+++ b/test/common/Csched_test.c
@@ -56,9 +56,7 @@ static char *sccsid = "@(#)$RCSfile: castor-2.1.9.8-fix-gcc47.patch,v $ $Revision: 1.1 $ $Date: 2
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
-#ifndef _WIN32
#include <unistd.h>
-#endif
#include <errno.h> /* errno and error codes */
#include "serrno.h" /* Castor's errno and error codes */
diff --git a/test/common/Cthread_kill.c b/test/common/Cthread_kill.c
index eb0747d..784a3e1 100644
--- a/test/common/Cthread_kill.c
+++ b/test/common/Cthread_kill.c
@@ -4,9 +4,7 @@
#include <errno.h>
#include <serrno.h>
#include <osdep.h>
-#ifndef _WIN32
#include <unistd.h>
-#endif
#include <signal.h>
#ifndef _WIN32