summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-04-20 08:13:30 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-20 08:13:30 +0000
commit45391d1b7687bd18d57fb197b97ed547d17d986d (patch)
tree6db3710aee4523b3432bfae29eaba64cdd786071
parent206731be50c8d550599769bca1d5259cf38b4262 (diff)
parentfa72bc1b483f9ac545b568961d9b257a421ade56 (diff)
downloadlibhardware_legacy-45391d1b7687bd18d57fb197b97ed547d17d986d.tar.gz
Merge "Fix static_assert compile issue" am: 9845354ef7 am: 6b3c4365b6
am: fa72bc1b48 Change-Id: Ia2beec198e15a7be7fd29adc047f8653ba4b47f2
-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 {