mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 01:08:01 +08:00
Annotate memfd_create with __THROW
This change annotates memfd_create with __THROW, fixing a compilation error when building crashpad in C++17 mode. This used to be a consistency error with glibc >= 2.27, that always annotates memfd_create with __THROW: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/bits/mman-shared.h#l51 Fixed: crashpad:339 Change-Id: Iab99e864f49dcfd9e0b445fd59a22c16bbe2a60b Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2643284 Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
b858473d9c
commit
9e96201002
@ -29,7 +29,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int memfd_create(const char* name, unsigned int flags);
|
||||
int memfd_create(const char* name, unsigned int flags) __THROW;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
int memfd_create(const char* name, unsigned int flags) {
|
||||
int memfd_create(const char* name, unsigned int flags) __THROW {
|
||||
static const crashpad::NoCfiIcall<decltype(memfd_create)*> next_memfd_create(
|
||||
dlsym(RTLD_NEXT, "memfd_create"));
|
||||
return next_memfd_create ? next_memfd_create(name, flags)
|
||||
|
Loading…
x
Reference in New Issue
Block a user