CMakeLists: fix build with old compilers by texierp · Pull Request #181 · librsync/librsync
The librsync code uses some C99 constructs, but old compilers such
as gcc 4.7 don't default to -std=c99. This commit makes sure librsync
is built with -std=c99.
Fixes:
src/rabinkarp.h:82:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = len; i; i--) {
^
src/rabinkarp.h:82:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>