summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-04-20 07:59:46 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-20 07:59:46 +0000
commit6b3c4365b692c610e47863e98c50c264dec7ad77 (patch)
treeca71c3b73cb0de98dfd52dbcfc7b680ac042605c
parentc985524d7120cb635f5990b3f10f94802792d7c0 (diff)
parent9845354ef785a88060bbeabd5db7f7b4b1c9171f (diff)
downloadlibhardware_legacy-6b3c4365b692c610e47863e98c50c264dec7ad77.tar.gz
Merge "Fix static_assert compile issue"
am: 9845354ef7 Change-Id: Ie3b44c59244222cc63cdc72cf0f54f4b78466df8
-rw-r--r--include/hardware_legacy/gscan.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hardware_legacy/gscan.h b/include/hardware_legacy/gscan.h
index 372f2bd..d5d8b9c 100644
--- a/include/hardware_legacy/gscan.h
+++ b/include/hardware_legacy/gscan.h
@@ -3,6 +3,16 @@
#ifndef __WIFI_HAL_GSCAN_H__
#define __WIFI_HAL_GSCAN_H__
+// Define static_assert() unless already defined by compiler.
+#ifndef __has_feature
+ #define __has_feature(__x) 0
+#endif
+#if !(__has_feature(cxx_static_assert)) && !defined(static_assert)
+ #define static_assert(__b, __m) \
+ extern int compile_time_assert_failed[ ( __b ) ? 1 : -1 ] \
+ __attribute__( ( unused ) );
+#endif
+
/* AP Scans */
typedef enum {