Skip to content

Commit

Permalink
disable syscall(2) usage; from robert
Browse files Browse the repository at this point in the history
  • Loading branch information
klemensn committed Feb 20, 2023
1 parent 17318a8 commit 5f9e56c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/abseil-cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CATEGORIES = devel
GH_ACCOUNT = abseil
GH_PROJECT = ${GH_ACCOUNT}-cpp
GH_TAGNAME = 20230125.1
REVISION = 0

HOMEPAGE = https://abseil.io/

Expand Down
19 changes: 19 additions & 0 deletions devel/abseil-cpp/patches/patch-absl_base_internal_raw_logging_cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Use write(2) not syscall(2)

Index: absl/base/internal/raw_logging.cc
--- absl/base/internal/raw_logging.cc.orig
+++ absl/base/internal/raw_logging.cc
@@ -52,10 +52,12 @@
// ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall
// syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len);
// for low level operations that want to avoid libc.
-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \
+#if (defined(__linux__) || defined(__FreeBSD__)) && \
!defined(__ANDROID__)
#include <sys/syscall.h>
#define ABSL_HAVE_SYSCALL_WRITE 1
+#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
+#elif defined(__OpenBSD__)
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
#else
#undef ABSL_HAVE_SYSCALL_WRITE

0 comments on commit 5f9e56c

Please sign in to comment.