⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268914 in webkit


Ignore:
Timestamp:
Oct 23, 2020, 1:26:00 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r268472 - [GLIB] Fix linking error for systems not providing <sys/memfd.h>
https://bugs.webkit.org/show_bug.cgi?id=217514

Reviewed by Carlos Garcia Campos.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp: Unconditionally check for <sys/mman.h> which should always exist instead

of <sys/memfd.h>. Also define the fallback with syscall() only for linux systems (as it requires <linux/memfd.h>).

Location:
releases/WebKitGTK/webkit-2.30/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog

    r268913 r268914  
     12020-10-14  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [GLIB] Fix linking error for systems not providing <sys/memfd.h>
     4        https://bugs.webkit.org/show_bug.cgi?id=217514
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: Unconditionally check for <sys/mman.h> which should always exist instead
     9        of <sys/memfd.h>. Also define the fallback with syscall() only for linux systems (as it requires <linux/memfd.h>).
     10
    1112020-10-15  Chris Lord  <clord@igalia.com>
    212
  • releases/WebKitGTK/webkit-2.30/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp

    r265326 r268914  
    4141#endif
    4242
    43 #if __has_include(<sys/memfd.h>)
    44 
    45 #include <sys/memfd.h>
    46 
    47 #else
     43#include <sys/mman.h>
     44
     45#ifndef MFD_ALLOW_SEALING
     46
     47#if HAVE(LINUX_MEMFD_H)
     48
     49#include <linux/memfd.h>
    4850
    4951// These defines were added in glibc 2.27, the same release that added memfd_create.
     
    6062#define F_SEAL_WRITE  0x0008
    6163
    62 #define MFD_ALLOW_SEALING 2U
    63 
    6464static int memfd_create(const char* name, unsigned flags)
    6565{
    6666    return syscall(__NR_memfd_create, name, flags);
    6767}
    68 #endif
     68#endif // #if HAVE(LINUX_MEMFD_H)
     69
     70#endif // #ifndef MFD_ALLOW_SEALING
    6971
    7072namespace WebKit {
Note: See TracChangeset for help on using the changeset viewer.