diff mbox series

[5/7] v4l-utils: fix compilation with libcxx

Message ID 20200429040627.27859-5-rosenp@gmail.com
State New
Headers show
Series None | expand

Commit Message

Rosen Penev April 29, 2020, 4:06 a.m. UTC
The fallthrough define doesn't work properly there. Use the included
macro.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 include/compiler.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/compiler.h b/include/compiler.h
index 22fa660b..53d9b7ec 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -1,5 +1,9 @@ 
 #ifdef __cplusplus
 
+#ifdef _LIBCPP_VERSION
+#define fallthrough _LIBCPP_FALLTHROUGH()
+#else
+
 #ifdef __clang__
 #define fallthrough [[clang::fallthrough]]
 #else
@@ -7,3 +11,4 @@ 
 #endif
 
 #endif
+#endif