Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
c5709c0aed

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

@@ -24,6 +24,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 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 <LibCore/AnonymousBuffer.h>
 #include <LibIPC/Decoder.h>
 #include <LibIPC/Decoder.h>
 #include <LibIPC/Encoder.h>
 #include <LibIPC/Encoder.h>