cmake: Define large file support for tests
[socket_wrapper.git] / src / CMakeLists.txt
index a1dbfafa27d7e481619b12a8e3336202939502c3..19e0d268390f10d3f3461fe6f8c195a575f3b857 100644 (file)
@@ -8,6 +8,12 @@ target_compile_options(socket_wrapper
                        PRIVATE
                           ${DEFAULT_C_COMPILE_FLAGS}
                           -D_GNU_SOURCE)
+if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+    target_compile_options(socket_wrapper
+                           PRIVATE
+                           -D_LARGEFILE64_SOURCE)
+endif()
+
 target_link_libraries(socket_wrapper
                       PRIVATE ${SWRAP_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})