unconditionally include sys/mman.h in os-compatibility.c

Fixes:
../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’?
  map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0);
                         ^~~~~~~~~
                         LOCK_READ

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
dev
James Hilliard 5 years ago
parent da0cd688d6
commit 7b36f171d0
  1. 3
      shared/os-compatibility.c

@ -34,10 +34,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <libweston/zalloc.h> #include <libweston/zalloc.h>
#ifdef HAVE_MEMFD_CREATE
#include <sys/mman.h> #include <sys/mman.h>
#endif
#include "os-compatibility.h" #include "os-compatibility.h"

Loading…
Cancel
Save