From 6d4bb07ea6abf82231ccd3699357b13ae113bb18 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Tue, 18 Apr 2017 22:18:08 +0200 Subject: [PATCH] CMake: detect mmap() and write result to rfbconfig.h --- CMakeLists.txt | 1 + rfb/rfbconfig.h.cmake | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d39672e..1d00d5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,7 @@ check_include_file("sys/types.h" HAVE_SYS_TYPES_H) check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY) check_function_exists(vfork LIBVNCSERVER_HAVE_VFORK) check_function_exists(vprintf LIBVNCSERVER_HAVE_VPRINTF) +check_function_exists(mmap LIBVNCSERVER_HAVE_MMAP) # On systems such as GNU/Linux with glibc, __b64_ntop is defined in a diff --git a/rfb/rfbconfig.h.cmake b/rfb/rfbconfig.h.cmake index 86f7ae3..661583d 100644 --- a/rfb/rfbconfig.h.cmake +++ b/rfb/rfbconfig.h.cmake @@ -72,6 +72,9 @@ /* Define to 1 if `vfork' works. */ #cmakedefine LIBVNCSERVER_HAVE_WORKING_VFORK 1 +/* Define to 1 if `mmap' exists. */ +#cmakedefine LIBVNCSERVER_HAVE_MMAP 1 + /* Define to 1 if you have the header file. */ #cmakedefine LIBVNCSERVER_HAVE_WS2TCPIP_H 1