diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch')
-rw-r--r-- | dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch new file mode 100644 index 000000000000..4c8648bb639f --- /dev/null +++ b/dev-util/bazel/files/bazel-3.7.2-musl-temp-failure-retry.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/815907 +https://github.com/bazelbuild/bazel/commit/bcce6dd026e90336e80616a8c1004a79a2f8640c + +From: philwo <philwo@google.com> +Date: Thu, 20 May 2021 08:13:09 -0700 +Subject: [PATCH] Add the TEMP_FAILURE_RETRY macro to linux-sandbox-pid1.cc. + +This allows us to build Bazel on Linux systems which use a C standard library that does not include this macro, like Alpine Linux (which uses musl). + +Fixes #12460. + +PiperOrigin-RevId: 374873483 +--- a/src/main/tools/linux-sandbox-pid1.cc ++++ b/src/main/tools/linux-sandbox-pid1.cc +@@ -49,6 +49,19 @@ + #include <linux/fs.h> + #endif + ++#ifndef TEMP_FAILURE_RETRY ++// Some C standard libraries like musl do not define this macro, so we'll ++// include our own version for compatibility. ++#define TEMP_FAILURE_RETRY(exp) \ ++ ({ \ ++ decltype(exp) _rc; \ ++ do { \ ++ _rc = (exp); \ ++ } while (_rc == -1 && errno == EINTR); \ ++ _rc; \ ++ }) ++#endif // TEMP_FAILURE_RETRY ++ + #include "src/main/tools/linux-sandbox-options.h" + #include "src/main/tools/linux-sandbox.h" + #include "src/main/tools/logging.h" |