Mesa (master): egl/wayland: define set_cloexec_or_close only when mkostemp is not present

Emil Velikov evelikov at kemper.freedesktop.org
Sat Aug 22 12:26:16 UTC 2015


Module: Mesa
Branch: master
Commit: d7bafcafd329d23ab0c76e3a6ae06277506f50f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7bafcafd329d23ab0c76e3a6ae06277506f50f3

Author: Boyan Ding <boyan.j.ding at gmail.com>
Date:   Fri Aug 21 21:44:36 2015 +0800

egl/wayland: define set_cloexec_or_close only when mkostemp is not present

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 <boyan.j.ding at gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Thomas Helland <thomashelland90 at gmail.com>

---

 src/egl/drivers/dri2/platform_wayland.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index dabaf1eb..dbc64ba 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
  */




More information about the mesa-commit mailing list