From bedc513fc2deddaf1e2724cccf4b11943437e6c9 Mon Sep 17 00:00:00 2001 From: Carl Smith Date: Wed, 13 Nov 2019 14:37:39 +1300 Subject: vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64 Glibc 2.28 now provides fcntl64 which is used instead of fcntl by defining fcntl as fcntl64 in fcntl.h Type: fix Change-Id: I87fedfbf3e0d241aafdc920e90f824d71353e0e6 Signed-off-by: Carl Smith (cherry picked from commit e16707b5b2195fda47c1a3db7ba61f30055d2dbc) --- src/cmake/syscall.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cmake/syscall.cmake') diff --git a/src/cmake/syscall.cmake b/src/cmake/syscall.cmake index 1e0a559b5df..aa3bac45372 100644 --- a/src/cmake/syscall.cmake +++ b/src/cmake/syscall.cmake @@ -34,3 +34,12 @@ if (HAVE_GETCPU) add_definitions(-DHAVE_GETCPU) endif() +check_c_source_compiles(" + #define _GNU_SOURCE + #include + int main() { return fcntl64 (0, 0); } +" HAVE_FCNTL64) + +if (HAVE_FCNTL64) + add_definitions(-DHAVE_FCNTL64) +endif() -- cgit 1.2.3-korg