mirror of
https://github.com/typesense/typesense.git
synced 2025-05-21 14:12:27 +08:00
62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
--- src/bvar/default_variables.cpp
|
|
+++ src/bvar/default_variables.cpp
|
|
@@ -447,7 +447,13 @@
|
|
// in MacOS.
|
|
memset(s, 0, sizeof(ProcIO));
|
|
static pid_t pid = getpid();
|
|
- rusage_info_current rusage;
|
|
+
|
|
+ #ifdef __arm__
|
|
+ rusage_info_v4 rusage;
|
|
+ #else
|
|
+ rusage_info_current rusage;
|
|
+ #endif
|
|
+
|
|
if (proc_pid_rusage(pid, RUSAGE_INFO_CURRENT, (void**)&rusage) != 0) {
|
|
PLOG(WARNING) << "Fail to proc_pid_rusage";
|
|
return false;
|
|
|
|
--- src/butil/third_party/dynamic_annotations/dynamic_annotations.h
|
|
+++ src/butil/third_party/dynamic_annotations/dynamic_annotations.h
|
|
@@ -498,7 +498,7 @@
|
|
const char *file, int line, const volatile void *mem,
|
|
const char *description) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK;
|
|
void DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRaceSized)(
|
|
- const char *file, int line, const volatile void *mem, long size,
|
|
+ const char *file, int line, const volatile void *mem, size_t size,
|
|
const char *description) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK;
|
|
void DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsUsedAsCondVar)(
|
|
const char *file, int line,
|
|
|
|
--- BUILD.bazel
|
|
+++ BUILD.bazel
|
|
@@ -48,7 +48,7 @@ LINKOPTS = [
|
|
"-pthread",
|
|
"-ldl",
|
|
] + select({
|
|
- "@bazel_tools//tools/osx:darwin": [
|
|
+ "@platforms//os:macos": [
|
|
"-framework CoreFoundation",
|
|
"-framework CoreGraphics",
|
|
"-framework CoreData",
|
|
@@ -206,7 +206,7 @@ BUTIL_SRCS = [
|
|
"src/butil/recordio.cc",
|
|
"src/butil/popen.cpp",
|
|
] + select({
|
|
- "@bazel_tools//tools/osx:darwin": [
|
|
+ "@platforms//os:macos": [
|
|
"src/butil/time/time_mac.cc",
|
|
"src/butil/mac/scoped_mach_port.cc",
|
|
],
|
|
@@ -322,7 +322,7 @@ cc_library(
|
|
"//bazel/config:brpc_with_glog": ["@com_github_google_glog//:glog"],
|
|
"//conditions:default": [],
|
|
}) + select({
|
|
- "@bazel_tools//tools/osx:darwin": [":macos_lib"],
|
|
+ "@platforms//os:macos": [":macos_lib"],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
|