File: 0007-avoid-timespec-build-error-on-VS2017-2019-83.patch

package info (click to toggle)
airspyone-host 1.0.10-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,200 kB
  • sloc: ansic: 6,550; sh: 31; xml: 20; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 862 bytes parent folder | download
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
From b97309a6a24db161de990d6e4f0432fc94f72cd9 Mon Sep 17 00:00:00 2001
From: "Dr. Johannes Pohl" <Johannes.Pohl90@gmail.com>
Date: Fri, 25 Feb 2022 17:50:36 +0100
Subject: [PATCH 07/29] avoid timespec build error on VS2017/2019 (#83)

---
 libairspy/src/airspy.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libairspy/src/airspy.c b/libairspy/src/airspy.c
index 427ffe2..d86d7aa 100644
--- a/libairspy/src/airspy.c
+++ b/libairspy/src/airspy.c
@@ -27,6 +27,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
 #include <stdlib.h>
 #include <string.h>
 #include <libusb.h>
+
+#if _MSC_VER > 1700  // To avoid error with Visual Studio 2017/2019 or more define which define timespec as it is already defined in pthread.h
+#define HAVE_STRUCT_TIMESPEC
+#endif
+
 #include <pthread.h>
 
 #include "airspy.h"
-- 
2.47.3