Просмотр исходного кода

LibCore: Try to fix fuzzer build

This might fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29675
See also `man memfd_create`.
Nico Weber 4 лет назад
Родитель
Сommit
c5709c0aed
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Userland/Libraries/LibCore/AnonymousBuffer.cpp

+ 4 - 0
Userland/Libraries/LibCore/AnonymousBuffer.cpp

@@ -24,6 +24,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if defined(__linux__) && !defined(_GNU_SOURCE)
+#    define _GNU_SOURCE // For memfd_create, MFD_CLOEXEC
+#endif
+
 #include <LibCore/AnonymousBuffer.h>
 #include <LibIPC/Decoder.h>
 #include <LibIPC/Encoder.h>