-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable syscall(2) usage; from robert
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
devel/abseil-cpp/patches/patch-absl_base_internal_raw_logging_cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |