Move Trusty workaround to the OPENSSL_LINUX define.

See b/169780122. This CL should be a no-op (the only other OPENSSL_LINUX
defines are in urandom/getrandom logic, which Trusty doesn't use), but
should be easier to work for future code.

Change-Id: I7676ce234a20ddaf54a881f2da1e1fcd680d1c78
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/43224
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
chromium-5359
David Benjamin 5 years ago committed by CQ bot account: commit-bot@chromium.org
parent fda92cd640
commit 9bf1634b93
  1. 2
      crypto/fipsmodule/rand/fork_detect.c
  2. 5
      include/openssl/base.h

@ -20,7 +20,7 @@
#include "fork_detect.h"
#if defined(OPENSSL_LINUX) && !defined(OPENSSL_TRUSTY)
#if defined(OPENSSL_LINUX)
#include <sys/mman.h>
#include <unistd.h>
#include <stdlib.h>

@ -138,7 +138,10 @@ extern "C" {
#define OPENSSL_WINDOWS
#endif
#if defined(__linux__)
// Trusty isn't Linux but currently defines __linux__. As a workaround, we
// exclude it here.
// TODO(b/169780122): Remove this workaround once Trusty no longer defines it.
#if defined(__linux__) && !defined(TRUSTY)
#define OPENSSL_LINUX
#endif

Loading…
Cancel
Save