Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 720032 | Differences between
and this patch

Collapse All | Expand All

(-)a/dev-util/bazel/bazel-0.22.0.ebuild (-1 / +5 lines)
Lines 43-50 bazel-get-flags() { Link Here
43
}
43
}
44
44
45
pkg_setup() {
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
48
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
49
}
50
}
50
51
Lines 76-81 src_prepare() { Link Here
76
		test --verbose_failures --verbose_test_summary
77
		test --verbose_failures --verbose_test_summary
77
		test --spawn_strategy=standalone --genrule_strategy=standalone
78
		test --spawn_strategy=standalone --genrule_strategy=standalone
78
		EOF
79
		EOF
80
81
	eapply "${FILESDIR}/${P}-rename-gettid-functions.patch"
82
	eapply "${FILESDIR}/${P}-include-limits-for-gcc-11.patch"
79
}
83
}
80
84
81
src_compile() {
85
src_compile() {
(-)a/dev-util/bazel/bazel-0.24.1.ebuild (-1 / +5 lines)
Lines 43-50 bazel-get-flags() { Link Here
43
}
43
}
44
44
45
pkg_setup() {
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
48
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
49
}
50
}
50
51
Lines 76-81 src_prepare() { Link Here
76
		test --verbose_failures --verbose_test_summary
77
		test --verbose_failures --verbose_test_summary
77
		test --spawn_strategy=standalone --genrule_strategy=standalone
78
		test --spawn_strategy=standalone --genrule_strategy=standalone
78
		EOF
79
		EOF
80
81
	eapply "${FILESDIR}/${P}-rename-gettid-functions.patch"
82
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
79
}
83
}
80
84
81
src_compile() {
85
src_compile() {
(-)a/dev-util/bazel/bazel-0.27.2.ebuild (-1 / +5 lines)
Lines 43-50 bazel-get-flags() { Link Here
43
}
43
}
44
44
45
pkg_setup() {
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
48
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
49
}
50
}
50
51
Lines 63-68 src_prepare() { Link Here
63
	# R: /proc/24939/setgroups
64
	# R: /proc/24939/setgroups
64
	# C: /usr/lib/systemd/systemd
65
	# C: /usr/lib/systemd/systemd
65
	addpredict /proc
66
	addpredict /proc
67
68
	eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch"
69
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
66
}
70
}
67
71
68
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/bazel-0.29.1.ebuild (-7 / +6 lines)
Lines 8-16 inherit bash-completion-r1 java-pkg-2 multiprocessing Link Here
8
DESCRIPTION="Fast and correct automated build system"
8
DESCRIPTION="Fast and correct automated build system"
9
HOMEPAGE="https://bazel.build/"
9
HOMEPAGE="https://bazel.build/"
10
10
11
GLIBC_GETTID_PATCH="${P}-rename-gettid-functions.patch"
11
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
12
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip
13
	https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}"
14
12
15
LICENSE="Apache-2.0"
13
LICENSE="Apache-2.0"
16
SLOT="0"
14
SLOT="0"
Lines 45-61 bazel-get-flags() { Link Here
45
}
43
}
46
44
47
pkg_setup() {
45
pkg_setup() {
48
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
49
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
50
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
51
}
50
}
52
51
53
src_unpack() {
52
src_unpack() {
54
	# Only unpack the main distfile
53
	# Only unpack the main distfile
55
	unpack ${P}-dist.zip
54
	unpack ${P}-dist.zip
56
	pushd third_party/grpc/src >/dev/null || die
57
	eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}"
58
	popd >/dev/null || die
59
}
55
}
60
56
61
src_prepare() {
57
src_prepare() {
Lines 68-73 src_prepare() { Link Here
68
	# R: /proc/24939/setgroups
64
	# R: /proc/24939/setgroups
69
	# C: /usr/lib/systemd/systemd
65
	# C: /usr/lib/systemd/systemd
70
	addpredict /proc
66
	addpredict /proc
67
68
	eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch"
69
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
71
}
70
}
72
71
73
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/bazel-1.0.1.ebuild (-1 / +5 lines)
Lines 43-50 bazel-get-flags() { Link Here
43
}
43
}
44
44
45
pkg_setup() {
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
48
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
49
}
50
}
50
51
Lines 63-68 src_prepare() { Link Here
63
	# R: /proc/24939/setgroups
64
	# R: /proc/24939/setgroups
64
	# C: /usr/lib/systemd/systemd
65
	# C: /usr/lib/systemd/systemd
65
	addpredict /proc
66
	addpredict /proc
67
68
	eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch"
69
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
66
}
70
}
67
71
68
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/bazel-1.2.0-r1.ebuild (-114 lines)
Lines 1-114 Link Here
1
# Copyright 1999-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=7
5
6
inherit bash-completion-r1 java-pkg-2 multiprocessing
7
8
DESCRIPTION="Fast and correct automated build system"
9
HOMEPAGE="https://bazel.build/"
10
11
GLIBC_GETTID_PATCH="${P}-rename-gettid-functions.patch"
12
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip
13
	https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}"
14
15
LICENSE="Apache-2.0"
16
SLOT="0"
17
KEYWORDS="~amd64"
18
IUSE="examples tools"
19
# strip corrupts the bazel binary
20
# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
21
RESTRICT="strip test"
22
RDEPEND=">=virtual/jdk-1.8:*"
23
DEPEND="${RDEPEND}
24
	app-arch/unzip
25
	app-arch/zip"
26
27
S="${WORKDIR}"
28
29
bazel-get-flags() {
30
	local i fs=()
31
	for i in ${CFLAGS}; do
32
		fs+=( "--copt=${i}" "--host_copt=${i}" )
33
	done
34
	for i in ${CXXFLAGS}; do
35
		fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
36
	done
37
	for i in ${CPPFLAGS}; do
38
		fs+=( "--copt=${i}" "--host_copt=${i}" )
39
		fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
40
	done
41
	for i in ${LDFLAGS}; do
42
		fs+=( "--linkopt=${i}" "--host_linkopt=${i}" )
43
	done
44
	echo "${fs[*]}"
45
}
46
47
pkg_setup() {
48
	echo ${PATH} | grep -q ccache && \
49
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
50
	java-pkg-2_pkg_setup
51
}
52
53
src_unpack() {
54
	# Only unpack the main distfile
55
	unpack ${P}-dist.zip
56
	pushd third_party/grpc/src >/dev/null || die
57
	eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}"
58
	popd >/dev/null || die
59
}
60
61
src_prepare() {
62
	default
63
64
	# F: fopen_wr
65
	# S: deny
66
	# P: /proc/self/setgroups
67
	# A: /proc/self/setgroups
68
	# R: /proc/24939/setgroups
69
	# C: /usr/lib/systemd/systemd
70
	addpredict /proc
71
}
72
73
src_compile() {
74
	export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk"
75
	VERBOSE=yes ./compile.sh || die
76
77
	./scripts/generate_bash_completion.sh \
78
		--bazel=output/bazel \
79
		--output=bazel-complete.bash \
80
		--prepend=scripts/bazel-complete-header.bash \
81
		--prepend=scripts/bazel-complete-template.bash
82
}
83
84
src_test() {
85
	output/bazel test \
86
		--verbose_failures \
87
		--spawn_strategy=standalone \
88
		--genrule_strategy=standalone \
89
		--verbose_test_summary \
90
		examples/cpp:hello-success_test || die
91
	output/bazel shutdown
92
}
93
94
src_install() {
95
	dobin output/bazel
96
	newbashcomp bazel-complete.bash ${PN}
97
	bashcomp_alias ${PN} ibazel
98
	insinto /usr/share/zsh/site-functions
99
	doins scripts/zsh_completion/_bazel
100
101
	if use examples; then
102
		docinto examples
103
		dodoc -r examples/*
104
		docompress -x /usr/share/doc/${PF}/examples
105
	fi
106
	# could really build tools but I don't know which ones
107
	# are actually used
108
	if use tools; then
109
		docinto tools
110
		dodoc -r tools/*
111
		docompress -x /usr/share/doc/${PF}/tools
112
		docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata
113
	fi
114
}
(-)a/dev-util/bazel/bazel-1.2.0.ebuild (-109 lines)
Lines 1-109 Link Here
1
# Copyright 1999-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=7
5
6
inherit bash-completion-r1 java-pkg-2 multiprocessing
7
8
DESCRIPTION="Fast and correct automated build system"
9
HOMEPAGE="https://bazel.build/"
10
11
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
12
13
LICENSE="Apache-2.0"
14
SLOT="0"
15
KEYWORDS="~amd64"
16
IUSE="examples tools"
17
# strip corrupts the bazel binary
18
# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
19
RESTRICT="strip test"
20
RDEPEND=">=virtual/jdk-1.8:*"
21
DEPEND="${RDEPEND}
22
	app-arch/unzip
23
	app-arch/zip"
24
25
S="${WORKDIR}"
26
27
bazel-get-flags() {
28
	local i fs=()
29
	for i in ${CFLAGS}; do
30
		fs+=( "--copt=${i}" "--host_copt=${i}" )
31
	done
32
	for i in ${CXXFLAGS}; do
33
		fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
34
	done
35
	for i in ${CPPFLAGS}; do
36
		fs+=( "--copt=${i}" "--host_copt=${i}" )
37
		fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
38
	done
39
	for i in ${LDFLAGS}; do
40
		fs+=( "--linkopt=${i}" "--host_linkopt=${i}" )
41
	done
42
	echo "${fs[*]}"
43
}
44
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	java-pkg-2_pkg_setup
49
}
50
51
src_unpack() {
52
	# Only unpack the main distfile
53
	unpack ${P}-dist.zip
54
}
55
56
src_prepare() {
57
	default
58
59
	# F: fopen_wr
60
	# S: deny
61
	# P: /proc/self/setgroups
62
	# A: /proc/self/setgroups
63
	# R: /proc/24939/setgroups
64
	# C: /usr/lib/systemd/systemd
65
	addpredict /proc
66
}
67
68
src_compile() {
69
	export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk"
70
	VERBOSE=yes ./compile.sh || die
71
72
	./scripts/generate_bash_completion.sh \
73
		--bazel=output/bazel \
74
		--output=bazel-complete.bash \
75
		--prepend=scripts/bazel-complete-header.bash \
76
		--prepend=scripts/bazel-complete-template.bash
77
}
78
79
src_test() {
80
	output/bazel test \
81
		--verbose_failures \
82
		--spawn_strategy=standalone \
83
		--genrule_strategy=standalone \
84
		--verbose_test_summary \
85
		examples/cpp:hello-success_test || die
86
	output/bazel shutdown
87
}
88
89
src_install() {
90
	dobin output/bazel
91
	newbashcomp bazel-complete.bash ${PN}
92
	bashcomp_alias ${PN} ibazel
93
	insinto /usr/share/zsh/site-functions
94
	doins scripts/zsh_completion/_bazel
95
96
	if use examples; then
97
		docinto examples
98
		dodoc -r examples/*
99
		docompress -x /usr/share/doc/${PF}/examples
100
	fi
101
	# could really build tools but I don't know which ones
102
	# are actually used
103
	if use tools; then
104
		docinto tools
105
		dodoc -r tools/*
106
		docompress -x /usr/share/doc/${PF}/tools
107
		docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata
108
	fi
109
}
(-)a/dev-util/bazel/bazel-1.2.1.ebuild (-7 / +6 lines)
Lines 8-16 inherit bash-completion-r1 java-pkg-2 multiprocessing Link Here
8
DESCRIPTION="Fast and correct automated build system"
8
DESCRIPTION="Fast and correct automated build system"
9
HOMEPAGE="https://bazel.build/"
9
HOMEPAGE="https://bazel.build/"
10
10
11
GLIBC_GETTID_PATCH="${PN}-1.2.0-rename-gettid-functions.patch"
11
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
12
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip
13
	https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}"
14
12
15
LICENSE="Apache-2.0"
13
LICENSE="Apache-2.0"
16
SLOT="0"
14
SLOT="0"
Lines 45-61 bazel-get-flags() { Link Here
45
}
43
}
46
44
47
pkg_setup() {
45
pkg_setup() {
48
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
49
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
50
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
51
}
50
}
52
51
53
src_unpack() {
52
src_unpack() {
54
	# Only unpack the main distfile
53
	# Only unpack the main distfile
55
	unpack ${P}-dist.zip
54
	unpack ${P}-dist.zip
56
	pushd third_party/grpc/src >/dev/null || die
57
	eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}"
58
	popd >/dev/null || die
59
}
55
}
60
56
61
src_prepare() {
57
src_prepare() {
Lines 68-73 src_prepare() { Link Here
68
	# R: /proc/24939/setgroups
64
	# R: /proc/24939/setgroups
69
	# C: /usr/lib/systemd/systemd
65
	# C: /usr/lib/systemd/systemd
70
	addpredict /proc
66
	addpredict /proc
67
68
	eapply "${FILESDIR}/${PN}-0.24.1-rename-gettid-functions.patch"
69
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
71
}
70
}
72
71
73
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/bazel-2.0.0.ebuild (-1 / +4 lines)
Lines 43-50 bazel-get-flags() { Link Here
43
}
43
}
44
44
45
pkg_setup() {
45
pkg_setup() {
46
	echo ${PATH} | grep -q ccache && \
46
	if has ccache ${FEATURES}; then
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
47
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
	fi
48
	java-pkg-2_pkg_setup
49
	java-pkg-2_pkg_setup
49
}
50
}
50
51
Lines 63-68 src_prepare() { Link Here
63
	# R: /proc/24939/setgroups
64
	# R: /proc/24939/setgroups
64
	# C: /usr/lib/systemd/systemd
65
	# C: /usr/lib/systemd/systemd
65
	addpredict /proc
66
	addpredict /proc
67
68
	eapply "${FILESDIR}/${PN}-0.22.0-include-limits-for-gcc-11.patch"
66
}
69
}
67
70
68
src_compile() {
71
src_compile() {
(-)a/dev-util/bazel/bazel-3.2.0.ebuild (-1 / +4 lines)
Lines 44-51 bazel-get-flags() { Link Here
44
}
44
}
45
45
46
pkg_setup() {
46
pkg_setup() {
47
	echo ${PATH} | grep -q ccache && \
47
	if has ccache ${FEATURES}; then
48
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
49
	fi
49
	java-pkg-2_pkg_setup
50
	java-pkg-2_pkg_setup
50
}
51
}
51
52
Lines 64-69 src_prepare() { Link Here
64
	# R: /proc/24939/setgroups
65
	# R: /proc/24939/setgroups
65
	# C: /usr/lib/systemd/systemd
66
	# C: /usr/lib/systemd/systemd
66
	addpredict /proc
67
	addpredict /proc
68
69
	eapply "${FILESDIR}/${P}-include-limits-for-gcc-11.patch"
67
}
70
}
68
71
69
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/bazel-3.7.2.ebuild (-1 / +4 lines)
Lines 44-51 bazel-get-flags() { Link Here
44
}
44
}
45
45
46
pkg_setup() {
46
pkg_setup() {
47
	echo ${PATH} | grep -q ccache && \
47
	if has ccache ${FEATURES}; then
48
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
48
		ewarn "${PN} usually fails to compile with ccache, you have been warned"
49
	fi
49
	java-pkg-2_pkg_setup
50
	java-pkg-2_pkg_setup
50
}
51
}
51
52
Lines 64-69 src_prepare() { Link Here
64
	# R: /proc/24939/setgroups
65
	# R: /proc/24939/setgroups
65
	# C: /usr/lib/systemd/systemd
66
	# C: /usr/lib/systemd/systemd
66
	addpredict /proc
67
	addpredict /proc
68
69
	eapply "${FILESDIR}/${PN}-3.2.0-include-limits-for-gcc-11.patch"
67
}
70
}
68
71
69
src_compile() {
72
src_compile() {
(-)a/dev-util/bazel/files/bazel-0.22.0-include-limits-for-gcc-11.patch (+125 lines)
Line 0 Link Here
1
diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc
2
index fbfca42723..a105ee89a7 100644
3
--- a/third_party/ijar/mapped_file_unix.cc
4
+++ b/third_party/ijar/mapped_file_unix.cc
5
@@ -19,6 +19,7 @@
6
 #include <sys/mman.h>
7
 
8
 #include <algorithm>
9
+#include <limits>
10
 
11
 #include "third_party/ijar/mapped_file.h"
12
 
13
diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h
14
index ed6616362f..da0848852b 100644
15
--- a/third_party/ijar/zlib_client.h
16
+++ b/third_party/ijar/zlib_client.h
17
@@ -19,6 +19,8 @@
18
 
19
 #include "third_party/ijar/common.h"
20
 
21
+#include <limits>
22
+
23
 namespace devtools_ijar {
24
 // Try to compress a file entry in memory using the deflate algorithm.
25
 // It will compress buf (of size length) unless the compressed size is bigger
26
diff --git a/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc b/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
27
index 5893533adf..78d964266d 100644
28
--- a/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
29
+++ b/third_party/protobuf/3.6.1/python/google/protobuf/pyext/message.cc
30
@@ -33,6 +33,7 @@
31
 
32
 #include <google/protobuf/pyext/message.h>
33
 
34
+#include <limits>
35
 #include <map>
36
 #include <memory>
37
 #include <string>
38
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc b/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
39
index 310000aabb..f95803d4f2 100644
40
--- a/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
41
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/repeated_field.cc
42
@@ -33,6 +33,7 @@
43
 //  Sanjay Ghemawat, Jeff Dean, and others.
44
 
45
 #include <algorithm>
46
+#include <limits>
47
 
48
 #include <google/protobuf/repeated_field.h>
49
 #include <google/protobuf/stubs/logging.h>
50
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc b/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
51
index f4af6a50ab..c3af6b7310 100644
52
--- a/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
53
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/stubs/bytestream.cc
54
@@ -32,6 +32,7 @@
55
 
56
 #include <string.h>
57
 #include <algorithm>
58
+#include <limits>
59
 
60
 namespace google {
61
 namespace protobuf {
62
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
63
index 249b8d5463..d5363c7784 100644
64
--- a/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
65
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/field_comparator_test.cc
66
@@ -42,6 +42,8 @@
67
 // and the opensource version gtest.h header includes cmath transitively
68
 // somehow.
69
 #include <gtest/gtest.h>
70
+#include <limits>
71
+
72
 namespace google {
73
 namespace protobuf {
74
 namespace util {
75
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
76
index 59bc28ae71..914fe18913 100644
77
--- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
78
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/datapiece.cc
79
@@ -38,6 +38,8 @@
80
 #include <google/protobuf/stubs/mathlimits.h>
81
 #include <google/protobuf/stubs/mathutil.h>
82
 
83
+#include <limits>
84
+
85
 namespace google {
86
 namespace protobuf {
87
 namespace util {
88
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
89
index 0dc710c7fe..aedf26bb12 100644
90
--- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
91
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/json_objectwriter_test.cc
92
@@ -34,6 +34,8 @@
93
 #include <google/protobuf/util/internal/utility.h>
94
 #include <gtest/gtest.h>
95
 
96
+#include <limits>
97
+
98
 namespace google {
99
 namespace protobuf {
100
 namespace util {
101
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
102
index 7f0df5677e..7d19608928 100644
103
--- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
104
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
105
@@ -58,6 +58,8 @@
106
 #include <gtest/gtest.h>
107
 
108
 
109
+#include <limits>
110
+
111
 namespace google {
112
 namespace protobuf {
113
 namespace util {
114
diff --git a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
115
index b8d917ce28..5b1694503b 100644
116
--- a/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
117
+++ b/third_party/protobuf/3.6.1/src/google/protobuf/util/internal/utility.cc
118
@@ -31,6 +31,7 @@
119
 #include <google/protobuf/util/internal/utility.h>
120
 
121
 #include <algorithm>
122
+#include <limits>
123
 
124
 #include <google/protobuf/stubs/callback.h>
125
 #include <google/protobuf/stubs/common.h>
(-)a/dev-util/bazel/files/bazel-0.22.0-rename-gettid-functions.patch (+44 lines)
Line 0 Link Here
1
diff --git a/third_party/grpc/src/core/support/log_linux.c b/third_party/grpc/src/core/support/log_linux.c
2
index 93a0c1b4c6..367c92118e 100644
3
--- a/third_party/grpc/src/core/support/log_linux.c
4
+++ b/third_party/grpc/src/core/support/log_linux.c
5
@@ -54,7 +54,7 @@
6
 #include <sys/syscall.h>
7
 #include <unistd.h>
8
 
9
-static long gettid(void) { return syscall(__NR_gettid); }
10
+static long sys_gettid(void) { return syscall(__NR_gettid); }
11
 
12
 void gpr_log(const char *file, int line, gpr_log_severity severity,
13
              const char *format, ...) {
14
@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
15
 
16
   gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
17
                gpr_log_severity_string(args->severity), time_buffer,
18
-               (int)(now.tv_nsec), gettid(), display_file, args->line);
19
+               (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
20
 
21
   fprintf(stderr, "%-60s %s\n", prefix, args->message);
22
   gpr_free(prefix);
23
diff --git a/third_party/grpc/src/core/support/log_posix.c b/third_party/grpc/src/core/support/log_posix.c
24
index 3ff171f99c..f0420a7b3b 100644
25
--- a/third_party/grpc/src/core/support/log_posix.c
26
+++ b/third_party/grpc/src/core/support/log_posix.c
27
@@ -45,7 +45,7 @@
28
 #include <time.h>
29
 #include <pthread.h>
30
 
31
-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
32
+static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
33
 
34
 void gpr_log(const char *file, int line, gpr_log_severity severity,
35
              const char *format, ...) {
36
@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
37
 
38
   fprintf(stderr, "%s%s.%09d %7tu %s:%d] %s\n",
39
           gpr_log_severity_string(args->severity), time_buffer,
40
-          (int)(now.tv_nsec), gettid(), display_file, args->line,
41
+          (int)(now.tv_nsec), sys_gettid(), display_file, args->line,
42
           args->message);
43
 }
44
 
(-)a/dev-util/bazel/files/bazel-0.24.1-rename-gettid-functions.patch (+66 lines)
Line 0 Link Here
1
diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/third_party/grpc/src/core/lib/gpr/log_linux.cc
2
index 561276f0c2..8b597b4cf2 100644
3
--- a/third_party/grpc/src/core/lib/gpr/log_linux.cc
4
+++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc
5
@@ -40,7 +40,7 @@
6
 #include <time.h>
7
 #include <unistd.h>
8
 
9
-static long gettid(void) { return syscall(__NR_gettid); }
10
+static long sys_gettid(void) { return syscall(__NR_gettid); }
11
 
12
 void gpr_log(const char* file, int line, gpr_log_severity severity,
13
              const char* format, ...) {
14
@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) {
15
   gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
16
   struct tm tm;
17
   static __thread long tid = 0;
18
-  if (tid == 0) tid = gettid();
19
+  if (tid == 0) tid = sys_gettid();
20
 
21
   timer = static_cast<time_t>(now.tv_sec);
22
   final_slash = strrchr(args->file, '/');
23
diff --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/third_party/grpc/src/core/lib/gpr/log_posix.cc
24
index 0acb225572..cd0b702b94 100644
25
--- a/third_party/grpc/src/core/lib/gpr/log_posix.cc
26
+++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc
27
@@ -30,7 +30,7 @@
28
 #include <string.h>
29
 #include <time.h>
30
 
31
-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
32
+static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
33
 
34
 void gpr_log(const char* file, int line, gpr_log_severity severity,
35
              const char* format, ...) {
36
@@ -85,7 +85,7 @@ void gpr_default_log(gpr_log_func_args* args) {
37
   char* prefix;
38
   gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
39
                gpr_log_severity_string(args->severity), time_buffer,
40
-               (int)(now.tv_nsec), gettid(), display_file, args->line);
41
+               (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
42
 
43
   fprintf(stderr, "%-70s %s\n", prefix, args->message);
44
   gpr_free(prefix);
45
diff --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
46
index 7a4870db78..4258ded8a0 100644
47
--- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
48
+++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
49
@@ -1150,7 +1150,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
50
 }
51
 
52
 #ifndef NDEBUG
53
-static long gettid(void) { return syscall(__NR_gettid); }
54
+static long sys_gettid(void) { return syscall(__NR_gettid); }
55
 #endif
56
 
57
 /* pollset->mu lock must be held by the caller before calling this.
58
@@ -1170,7 +1170,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
59
 #define WORKER_PTR (&worker)
60
 #endif
61
 #ifndef NDEBUG
62
-  WORKER_PTR->originator = gettid();
63
+  WORKER_PTR->originator = sys_gettid();
64
 #endif
65
   if (grpc_polling_trace.enabled()) {
66
     gpr_log(GPR_INFO,
(-)a/dev-util/bazel/files/bazel-3.2.0-include-limits-for-gcc-11.patch (-1 / +25 lines)
Line 0 Link Here
0
- 
1
diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc
2
index 6e3a908718..030e9ca59f 100644
3
--- a/third_party/ijar/mapped_file_unix.cc
4
+++ b/third_party/ijar/mapped_file_unix.cc
5
@@ -19,6 +19,7 @@
6
 #include <sys/mman.h>
7
 
8
 #include <algorithm>
9
+#include <limits>
10
 
11
 #include "third_party/ijar/mapped_file.h"
12
 
13
diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h
14
index ed6616362f..da0848852b 100644
15
--- a/third_party/ijar/zlib_client.h
16
+++ b/third_party/ijar/zlib_client.h
17
@@ -19,6 +19,8 @@
18
 
19
 #include "third_party/ijar/common.h"
20
 
21
+#include <limits>
22
+
23
 namespace devtools_ijar {
24
 // Try to compress a file entry in memory using the deflate algorithm.
25
 // It will compress buf (of size length) unless the compressed size is bigger

Return to bug 720032