Don't define OPENSSL_LINUX for CROS_EC and CROS_ZEPHYR

CrOS EC and Zephyr build "emulation" targets that run in Linux
userspace. Although running on Linux, we want boringssl to run the same
as if it were running on the embedded target.

BUG=b/273639386

Change-Id: Id5f13391f09889e955d2a86e2c5317903b2a8bd6
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/65182
Reviewed-by: David Benjamin <davidben@google.com>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/include/openssl/target.h b/include/openssl/target.h
index d5b5c7e..29b1dc6 100644
--- a/include/openssl/target.h
+++ b/include/openssl/target.h
@@ -83,7 +83,8 @@
 #endif
 
 // Trusty and Android baremetal aren't Linux but currently define __linux__.
-// As a workaround, we exclude them here. We also exclude nanolibc. nanolibc
+// As a workaround, we exclude them here.
+// We also exclude nanolibc/CrOS EC/Zephyr. nanolibc/CrOS EC/Zephyr
 // sometimes build for a non-Linux target (which should not define __linux__),
 // but also sometimes build for Linux. Although technically running in Linux
 // userspace, this lacks all the libc APIs we'd normally expect on Linux, so we
@@ -93,7 +94,8 @@
 // TODO(b/291101350): Remove this workaround once Android baremetal no longer
 // defines it.
 #if defined(__linux__) && !defined(__TRUSTY__) && \
-    !defined(ANDROID_BAREMETAL) && !defined(OPENSSL_NANOLIBC)
+    !defined(ANDROID_BAREMETAL) && !defined(OPENSSL_NANOLIBC) && \
+    !defined(CROS_EC) && !defined(CROS_ZEPHYR)
 #define OPENSSL_LINUX
 #endif