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: I4c9901bb80b305202d3d38fff678134a48efee60
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>
GitOrigin-RevId: 9e96201002df030fc71a20fe53b7b054bc69743f
diff --git a/compat/linux/sys/mman.h b/compat/linux/sys/mman.h
index 61c55d7..43155da 100644
--- a/compat/linux/sys/mman.h
+++ b/compat/linux/sys/mman.h
@@ -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"
diff --git a/compat/linux/sys/mman_memfd_create.cc b/compat/linux/sys/mman_memfd_create.cc
index e0ee5a4..619431e 100644
--- a/compat/linux/sys/mman_memfd_create.cc
+++ b/compat/linux/sys/mman_memfd_create.cc
@@ -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)