kumquat-buildroot/package/librsync/0001-CMakeLists-fix-build-with-old-compilers.patch
Fabrice Fontaine d66e515ea9 package/librsync: bump to version 2.2.1
librsync can be built statically through the standard cmake
BUILD_SHARED_LIBS option since version 2.2.0 and
1ad3c7c600

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-11-23 21:40:29 +01:00

40 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 77b78e01f83b65f3c38941f54f71beaaddcb6fc1 Mon Sep 17 00:00:00 2001
From: Pierre-Jean Texier <pjtexier@koncepto.io>
Date: Sat, 23 Nov 2019 16:51:46 +0100
Subject: [PATCH] CMakeLists: fix build with old compilers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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=gnu99.
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>
[Upstream status: https://github.com/librsync/librsync/pull/181]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f810061..794d9c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ if (CMAKE_C_COMPILER_ID MATCHES "(Clang|Gnu|GNU)")
# TODO: Set for MSVC and other compilers.
# TODO: Set -Werror when the build is clean.
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99")
endif()
site_name(BUILD_HOSTNAME)