File: 0003-Fix-compile-error-for-GCC-10.patch

package info (click to toggle)
gnuais 0.3.3-9.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: ansic: 5,790; sql: 33; makefile: 4; sh: 3
file content (42 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (3)
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
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sun, 26 Jul 2020 20:38:37 +0200
Subject: Fix compile error for GCC 10

---
 src/out_mysql.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/out_mysql.h b/src/out_mysql.h
index 967fa1d..48f925e 100644
--- a/src/out_mysql.h
+++ b/src/out_mysql.h
@@ -1,4 +1,3 @@
-
 /*
  *	out_mysql.h
  *
@@ -20,6 +19,8 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+#ifndef OUT_MYSQL_H
+#define OUT_MYSQL_H
 
 #include <time.h>
 #ifdef HAVE_MYSQL
@@ -32,7 +33,9 @@ struct mysql_state_t {
 	int connected;
 	int inserts;
 #endif
-} *my;
+};
+
+extern struct mysql_state_t *my;
 
 extern struct mysql_state_t *myout_init();
 
@@ -55,3 +58,4 @@ extern int myout_ais_vesseldatab(struct mysql_state_t *my,
 
 extern int myout_nmea(struct mysql_state_t *my, time_t tid, char *nmea);
 
+#endif /* OUT_MYSQL_H */