vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64
[vpp.git] / src / cmake / syscall.cmake
index 1e0a559..aa3bac4 100644 (file)
@@ -34,3 +34,12 @@ if (HAVE_GETCPU)
     add_definitions(-DHAVE_GETCPU)
 endif()
 
+check_c_source_compiles("
+  #define _GNU_SOURCE
+  #include <fcntl.h>
+  int main() { return fcntl64 (0, 0); }
+" HAVE_FCNTL64)
+
+if (HAVE_FCNTL64)
+    add_definitions(-DHAVE_FCNTL64)
+endif()