libiio: Add a patch to fix compilation with old glibc
PATCH 1/1 libiio: Add a patch to fix compilation with old glibc
Cherry-picked from upstream.
Signed-off-by Paul Cercueil <[email protected]>
--- .../0002-CMake-Link-with-librt-if-found.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/libiio/0002-CMake-Link-with-librt-if-found.patch
package/libiio/0002-CMake-Link-with-librt-if-found.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 1bc450179a0819970261e6a29071756d09b71c5f Mon Sep 17 00:00:00 2001 +From: Paul Cercueil <[email protected]> +Date: Fri, 19 Aug 2016 09:00:58 +0200 +Subject: [PATCH] CMake: Link with librt if found + +This is required for older versions of glibc. + +Signed-off-by: Paul Cercueil <[email protected]> +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a339fe..3dd3520 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,6 +113,10 @@ add_definitions(-DLIBIIO_VERSION_GIT="${LIBIIO_VERSION_GIT}") + if(WITH_LOCAL_BACKEND) + add_definitions(-DLOCAL_BACKEND=1) + set(LIBIIO_CFILES ${LIBIIO_CFILES} local.c) ++ ++ # Link with librt if present ++ find_library(LIBRT_LIBRARIES rt) ++ set(LIBS_TO_LINK ${LIBS_TO_LINK} ${LIBRT_LIBRARIES}) + endif() + + find_library(LIBUSB_LIBRARIES usb-1.0) +-- +2.8.1 +
Signature · 1 line
2.8.1
PATCH 1/1 libiio: Add a patch to fix compilation with old glibc
Hello,
Quoted 7 lines · Paul Cercueil
Cherry-picked from upstream.
Signed-off-by Paul Cercueil <[email protected]>--- .../0002-CMake-Link-with-librt-if-found.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/libiio/0002-CMake-Link-with-librt-if-found.patch
You forgot to add a reference to the autobuilder failure, so I've added that and applied your patch to master. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com