This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/5] Cygwin: fix GCC 8.3 'local external declaration' errors


Move external declarations out of function definition.
---
 winsup/cygserver/bsd_mutex.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/winsup/cygserver/bsd_mutex.cc b/winsup/cygserver/bsd_mutex.cc
index 52531bc72..13c5f90e8 100644
--- a/winsup/cygserver/bsd_mutex.cc
+++ b/winsup/cygserver/bsd_mutex.cc
@@ -275,13 +275,12 @@ public:
 };
 
 static msleep_sync_array *msleep_sync;
+extern struct msginfo msginfo;
+extern struct seminfo seminfo;
 
 void
 msleep_init (void)
 {
-  extern struct msginfo msginfo;
-  extern struct seminfo seminfo;
-
   msleep_glob_evt = CreateEvent (NULL, TRUE, FALSE, NULL);
   if (!msleep_glob_evt)
     panic ("CreateEvent in msleep_init failed: %u", GetLastError ());
-- 
2.21.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]