[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Fix compiling QT code with at least GCC 6.2.1
From: |
Robert Norris |
Subject: |
[gpsd-dev] [PATCH] Fix compiling QT code with at least GCC 6.2.1 |
Date: |
Fri, 30 Dec 2016 21:55:59 +0000 |
Inclusion of the "compiler.h" must be outside of extern C scope,
otherwise the C++ compiler may throw errors such like:
"error: template with C linkage"
Hence close and reopen the extern scope surrounding the use of compiler.h
in gpsd.h which itself gets included in C++ code.
---
gpsd.h-tail | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gpsd.h-tail b/gpsd.h-tail
index d1fb5ead..04c00a68 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -10,7 +10,13 @@
#include <termios.h>
#include "gps.h"
+# ifdef __cplusplus
+}
+# endif
#include "compiler.h"
+# ifdef __cplusplus
+extern "C" {
+# endif
/*
* Constants for the VERSION response
--
2.11.0
- [gpsd-dev] [PATCH] Fix compiling QT code with at least GCC 6.2.1,
Robert Norris <=