Control: tag -1 patch

Attached please find a relevant patch which we applied in Ubuntu. It contains two cherry picked commits from upstream.

However, while that patch allows bazel-bootstrap to build with gcc-11, autopkgtest still triggers similar errors. So there seems to be more into it.

--
Gunnar Hjalmarsson
Description: Include <limits> to fix FTBFS with gcc-11
Origin:
 https://github.com/bazelbuild/bazel/commit/8cc0e261
 https://github.com/bazelbuild/bazel/commit/9761509f
Bug: https://github.com/bazelbuild/bazel/issues/12702

From: cushon <cus...@google.com>
Date: Tue, 15 Dec 2020 23:18:55 -0800
Subject: [PATCH] Include <limits>
---
 third_party/ijar/zlib_client.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h
index ed6616362fcc..c4b051e0100c 100644
--- a/third_party/ijar/zlib_client.h
+++ b/third_party/ijar/zlib_client.h
@@ -16,6 +16,7 @@
 #define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_
 
 #include <limits.h>
+#include <limits>
 
 #include "third_party/ijar/common.h"
 

From: David Ostrovsky <da...@ostrovsky.org>
Date: Wed, 16 Jun 2021 07:55:57 -0700
Subject: [PATCH] Fix building on gcc 11
---
 third_party/ijar/mapped_file_unix.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc
index 6e3a90871844..65179e3290ec 100644
--- a/third_party/ijar/mapped_file_unix.cc
+++ b/third_party/ijar/mapped_file_unix.cc
@@ -15,10 +15,11 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <sys/mman.h>
+#include <unistd.h>
 
 #include <algorithm>
+#include <limits>
 
 #include "third_party/ijar/mapped_file.h"
 


Reply via email to