aports/testing/bazel6/0005-cstdint.patch
2026-02-24 17:53:30 +00:00

67 lines
1.8 KiB
Diff

diff --git a/src/main/cpp/blaze.h b/src/main/cpp/blaze.h
index 2350fa1449..2b431b49fb 100644
--- a/src/main/cpp/blaze.h
+++ b/src/main/cpp/blaze.h
@@ -15,6 +15,7 @@
#define BAZEL_SRC_MAIN_CPP_BLAZE_H_
#include <string>
+#include <cstdint>
#include "src/main/cpp/option_processor.h"
#include "src/main/cpp/workspace_layout.h"
diff --git a/src/main/cpp/util/numbers.h b/src/main/cpp/util/numbers.h
index f1ef6f7991..62afeb65c2 100644
--- a/src/main/cpp/util/numbers.h
+++ b/src/main/cpp/util/numbers.h
@@ -15,6 +15,7 @@
#define BAZEL_SRC_MAIN_CPP_UTIL_NUMBERS_H_
#include <string>
+#include <cstdint>
namespace blaze_util {
diff --git a/src/main/native/unix_jni.cc b/src/main/native/unix_jni.cc
index 1af7983b74..b500161c56 100644
--- a/src/main/native/unix_jni.cc
+++ b/src/main/native/unix_jni.cc
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#define lstat64 lstat
+#define stat64 stat
+#define fstatat64 fstatat
#include "src/main/native/unix_jni.h"
#include <dirent.h>
diff --git a/src/main/native/unix_jni_linux.cc b/src/main/native/unix_jni_linux.cc
index b32c1d33a1..1ee8c7e9d8 100644
--- a/src/main/native/unix_jni_linux.cc
+++ b/src/main/native/unix_jni_linux.cc
@@ -17,8 +17,9 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/xattr.h>
-
#include <string>
+#define stat64 stat
+#define fstatat64 fstatat
#include "src/main/native/unix_jni.h"
diff --git a/src/tools/singlejar/port.h b/src/tools/singlejar/port.h
index 1bf71fc16a..07e9028ead 100644
--- a/src/tools/singlejar/port.h
+++ b/src/tools/singlejar/port.h
@@ -32,7 +32,7 @@
typedef off_t off64_t;
#elif defined(_WIN32)
typedef __int64 off64_t;
-#elif defined(__OpenBSD__)
+#else
typedef int64_t off64_t;
#endif
static_assert(sizeof(off64_t) == 8, "File offset type must be 64-bit");