39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
|
From 888dd1ae6a0261230b2bc47079d7b20df8c05e68 Mon Sep 17 00:00:00 2001
|
|||
|
From: James Hilliard <james.hilliard1@gmail.com>
|
|||
|
Date: Sat, 1 Feb 2020 20:02:29 -0700
|
|||
|
Subject: [PATCH] unconditionally include sys/mman.h in os-compatibility.c
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
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>
|
|||
|
[Upstream status:
|
|||
|
https://gitlab.freedesktop.org/wayland/weston/merge_requests/368]
|
|||
|
---
|
|||
|
shared/os-compatibility.c | 2 --
|
|||
|
1 file changed, 2 deletions(-)
|
|||
|
|
|||
|
diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
|
|||
|
index 5e1ce479..ddc37807 100644
|
|||
|
--- a/shared/os-compatibility.c
|
|||
|
+++ b/shared/os-compatibility.c
|
|||
|
@@ -35,9 +35,7 @@
|
|||
|
#include <stdlib.h>
|
|||
|
#include <libweston/zalloc.h>
|
|||
|
|
|||
|
-#ifdef HAVE_MEMFD_CREATE
|
|||
|
#include <sys/mman.h>
|
|||
|
-#endif
|
|||
|
|
|||
|
#include "os-compatibility.h"
|
|||
|
|
|||
|
--
|
|||
|
2.20.1
|
|||
|
|