summaryrefslogtreecommitdiffstats
path: root/package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch
blob: df11a492ad49f1ac156652b8fe0aa2de7b8b83a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 8dcb6c3f60123511d77b9fc7e4e22ae710e7d2f4 Mon Sep 17 00:00:00 2001
From: Matthew Fornero <mfornero@mathworks.com>
Date: Wed, 8 Jun 2016 20:03:56 -0400
Subject: [PATCH] IIOD: Link pthread with no network backend

If iiod is built without the network backend, CMake will not link in
pthreads. Update the CMake configuration to accomodate this case.

Signed-off-by: Matthew Fornero <mfornero@mathworks.com>
---
 CMakeLists.txt |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70f61f0..20fa9f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 	if (WITH_IIOD AND NOT WITH_LOCAL_BACKEND)
 		message(SEND_ERROR "IIOD can only be enabled if the local backend is enabled")
 	endif()
+	if (WITH_IIOD)
+		set(NEED_THREADS 1)
+	endif()
 endif()
 
 option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
-- 
1.7.10.4

OpenPOWER on IntegriCloud