diff options
author | Jorge Lucangeli Obes <jorgelo@google.com> | 2016-04-11 13:30:08 -0700 |
---|---|---|
committer | Zach Riggle <riggle@google.com> | 2016-05-03 16:38:44 -0400 |
commit | 8c3febd20f0cef00a5049f6962666b6c62093aa9 (patch) | |
tree | fac8e36778fddfc4c7ab223947884a4a746718c6 | |
parent | abb93141f0255a624bda29e4842611f8bc120df8 (diff) | |
download | minijail-8c3febd20f0cef00a5049f6962666b6c62093aa9.tar.gz |
Fix #ifdef statement.nougat-dev
Previous version did not compile with GCC.
Bug: 27980137
(cherry picked from commit 9e35c09854e55973731f80dd7cc41b80c20eec42)
Change-Id: Ibbad230f6651c51df62905799c5d4fad839919b3
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | util.h | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -205,6 +205,8 @@ LOCAL_MODULE := drop_privs LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := $(minijailCommonCFlags) LOCAL_CLANG := true +# Don't build with ASan, but leave commented out for easy local debugging. +# LOCAL_SANITIZE := address LOCAL_SRC_FILES := \ examples/drop_privs.cpp @@ -38,7 +38,11 @@ static inline int is_android() { } static inline int running_with_asan() { -#if defined(__clang__) && __has_feature(address_sanitizer) +#ifndef __has_feature +#define __has_feature(x) 0 +#endif + +#if __has_feature(address_sanitizer) return 1; #else return 0; |