Commit | Line | Data |
---|---|---|
f0dc24c8 FF |
1 | Patch submitted upstream at https://github.com/librsync/librsync/pull/136 |
2 | diff -u -r ../librsync-2.0.1/CMakeLists.txt ./CMakeLists.txt | |
3 | --- ../librsync-2.0.1/CMakeLists.txt 2017-10-17 03:45:57.000000000 +0200 | |
4 | +++ ./CMakeLists.txt 2017-12-23 23:34:02.239823106 +0100 | |
5 | @@ -108,8 +108,13 @@ | |
6 | check_type_size ( "unsigned short" SIZEOF_UNSIGNED_SHORT ) | |
7 | ||
8 | # Check for printf "%zu" size_t formating support. | |
9 | -include(CheckCSourceRuns) | |
10 | -check_c_source_runs("#include <stdio.h>\nint main(){char o[8];sprintf(o, \"%zu\", (size_t)7);return o[0] != '7';}" HAVE_PRINTF_Z) | |
11 | +if(CMAKE_CROSSCOMPILING) | |
12 | + set(HAVE_PRINTF_Z ON) | |
13 | + message (STATUS "Cross compiling - assuming printf \"%zu\" size_t formating support") | |
14 | +else() | |
15 | + include(CheckCSourceRuns) | |
16 | + check_c_source_runs("#include <stdio.h>\nint main(){char o[8];sprintf(o, \"%zu\", (size_t)7);return o[0] != '7';}" HAVE_PRINTF_Z) | |
17 | +endif() | |
18 | ||
19 | include (TestBigEndian) | |
20 | TEST_BIG_ENDIAN(WORDS_BIGENDIAN) |