diff options
author | Patryk Duda <patrykd@google.com> | 2024-04-05 11:06:22 +0200 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-04-11 18:44:59 +0000 |
commit | 6b3e5d5c3565dac726c81b6ca19580ec5a7c2676 (patch) | |
tree | 12bf220ddfb57bf2b9c793cb43bd67ec2a85a50b /include | |
parent | 4898d3f39597e65c56e057df7b81b04407111125 (diff) | |
download | boringssl-6b3e5d5c3565dac726c81b6ca19580ec5a7c2676.zip boringssl-6b3e5d5c3565dac726c81b6ca19580ec5a7c2676.tar.gz boringssl-6b3e5d5c3565dac726c81b6ca19580ec5a7c2676.tar.bz2 |
Fix Zephyr define and description
Zephyr RTOS is not a ChromeOS project, so it shouldn't be prefixed with
"CROS". Actually, Zephyr build system defines "__ZEPHYR__" to tell
third-party libraries that the code is compiled for Zephyr.
BUG=b:321092852
Change-Id: Iba0a4c80607d6246ce523b9f92477ef3fc0bf47a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67627
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/target.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/openssl/target.h b/include/openssl/target.h index 29b1dc6..8b05661 100644 --- a/include/openssl/target.h +++ b/include/openssl/target.h @@ -84,18 +84,18 @@ // Trusty and Android baremetal aren't Linux but currently define __linux__. // 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 -// treat it as a non-Linux target. +// We also exclude nanolibc/CrOS EC. nanolibc/CrOS EC 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 treat it as a +// non-Linux target. // // TODO(b/169780122): Remove this workaround once Trusty no longer defines it. // 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(CROS_EC) && !defined(CROS_ZEPHYR) + !defined(CROS_EC) #define OPENSSL_LINUX #endif @@ -148,12 +148,12 @@ #define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED #endif -// CROS_ZEPHYR is an embedded target for ChromeOS Zephyr Embedded Controller. +// Zephyr is an open source RTOS, optimized for embedded devices. // Defining this on any other platform is not supported. Other embedded // platforms must introduce their own defines. // // https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/docs/zephyr/README.md -#if defined(CROS_ZEPHYR) +#if defined(__ZEPHYR__) #define OPENSSL_NO_FILESYSTEM #define OPENSSL_NO_POSIX_IO #define OPENSSL_NO_SOCK |