gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH] Define barrier() only if SHM export is enabled.


From: Beat Bolli
Subject: [gpsd-dev] [PATCH] Define barrier() only if SHM export is enabled.
Date: Fri, 1 Nov 2013 19:49:27 +0100

Signed-off-by: Beat Bolli <address@hidden>
---
 gpsd.h-tail | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gpsd.h-tail b/gpsd.h-tail
index 80319e8..848cea8 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -996,6 +996,7 @@ void cfmakeraw(struct termios *);
 /* Needed because 4.x versions of GCC are really annoying */
 #define ignore_return(funcall) assert(funcall != -23)
 
+#ifdef SHM_EXPORT_ENABLE
 /* memory barriers */
 static /address@hidden@*/ inline void barrier(void) {
 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
@@ -1006,6 +1007,7 @@ static /address@hidden@*/ inline void barrier(void) {
 # error Memory barriers are not supported. Disable SHM export.
 #endif /* defined(__GNUC__) */
 }
+#endif /* SHM_EXPORT_ENABLE */
 
 #endif /* _GPSD_H_ */
 // Local variables:
-- 
1.8.4.rc3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]