summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorBoyan Ding <[email protected]>2015-08-21 21:44:36 +0800
committerEmil Velikov <[email protected]>2015-08-22 12:59:01 +0100
commitd7bafcafd329d23ab0c76e3a6ae06277506f50f3 (patch)
tree3d496584f9002e843c1d2f7b7458037948a9ab80 /src/egl
parentec256eceedd0a00b41c2c94d5a32609f0e1870b2 (diff)
egl/wayland: define set_cloexec_or_close only when mkostemp is not present11.0-branchpoint
Fixes a compiler warning of defined but not used function when HAVE_MKOSTEMP is defined. Fixes: eb3e2562a4b(configure.ac: check for mkostemp()) Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index dabaf1ebbd1..dbc64ba2d8a 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1227,6 +1227,8 @@ dri2_wl_swrast_get_stride_for_format(int format, int w)
* Taken from weston shared/os-compatibility.c
*/
+#ifndef HAVE_MKOSTEMP
+
static int
set_cloexec_or_close(int fd)
{
@@ -1249,6 +1251,8 @@ err:
return -1;
}
+#endif
+
/*
* Taken from weston shared/os-compatibility.c
*/