Skip to content

Commit 5b0eac7

Browse files
committed
Add largefile support for gpgme
1 parent 84bc039 commit 5b0eac7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ function(add_libzsync2 NAME BUILD_TYPE)
4444
if(LIBSOCKET_FOUND)
4545
target_compile_definitions("${NAME}" PRIVATE HAVE_LIBSOCKET=1)
4646
endif()
47+
48+
# largefile support à la gpgme
49+
# libzsync uses off_t everywhere, this allows us to support files larger than 2GiB
50+
# must(!) be public definitions, otherwise integrating libzsync2 elsewhere (e.g., AppImageUpdate) may lead to
51+
# compiler errors because the off_t definitions differ
52+
target_compile_definitions("${NAME}"
53+
PUBLIC -D_FILE_OFFSET_BITS=64
54+
PUBLIC -DLARGEFILE_SOURCE
55+
)
4756
endfunction()
4857

4958
add_libzsync2(libzsync2 SHARED)

0 commit comments

Comments
 (0)