[PATCH] D53413: [Sanitize] openbsd does not have sysctlbyname call
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 23:26:20 PDT 2018
devnexen updated this revision to Diff 170146.
https://reviews.llvm.org/D53413
Files:
lib/sanitizer_common/sanitizer_linux.cc
lib/sanitizer_common/sanitizer_posix.h
Index: lib/sanitizer_common/sanitizer_posix.h
===================================================================
--- lib/sanitizer_common/sanitizer_posix.h
+++ lib/sanitizer_common/sanitizer_posix.h
@@ -62,8 +62,10 @@
int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
uptr *oldlenp, const void *newp, uptr newlen);
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_DARWIN
int internal_sysctlbyname(const char *sname, void *oldp, uptr *oldlenp,
const void *newp, uptr newlen);
+#endif
// These functions call appropriate pthread_ functions directly, bypassing
// the interceptor. They are weak and may not be present in some tools.
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -796,16 +796,13 @@
#endif
}
+#if SANITIZER_FREEBSD
int internal_sysctlbyname(const char *sname, void *oldp, uptr *oldlenp,
const void *newp, uptr newlen) {
-#if SANITIZER_OPENBSD
- return sysctlbyname(sname, oldp, (size_t *)oldlenp, (void *)newp,
- (size_t)newlen);
-#else
return sysctlbyname(sname, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
-#endif
}
#endif
+#endif
#if SANITIZER_LINUX
#define SA_RESTORER 0x04000000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53413.170146.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/df7ee96c/attachment.bin>
More information about the llvm-commits
mailing list