summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-04-20 07:54:09 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-04-20 07:54:10 +0000
commit9845354ef785a88060bbeabd5db7f7b4b1c9171f (patch)
treeca71c3b73cb0de98dfd52dbcfc7b680ac042605c
parent39a2e208fa25ce7d05cfc4b550863eeb0bd10941 (diff)
parent4cc6080b2b694a7c32332a2d3b9702845e841746 (diff)
downloadlibhardware_legacy-9845354ef785a88060bbeabd5db7f7b4b1c9171f.tar.gz
Merge "Fix static_assert compile issue"
-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 {