debian/patches: add am7xxx-bump-_POSIX_C_SOURCE-to-200112L-for-lroundf.patch
[libam7xxx.git] / debian / patches / am7xxx-bump-_POSIX_C_SOURCE-to-200112L-for-lroundf.patch
1 From 80f9d332324848b878fca92f7097aa8fb71ec423 Mon Sep 17 00:00:00 2001
2 From: Antonio Ospite <ao2@ao2.it>
3 Date: Tue, 17 Nov 2015 18:42:39 +0100
4 Subject: [PATCH] am7xxx: bump _POSIX_C_SOURCE to 200112L for lroundf()
5 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM<pyWR#k60!#=#>/Vb;]yA5<GWI5`6u&+
6  ;6b'@y|8w"wB;4/e!7wYYrcqdJFY,~%Gk_4]cq$Ei/7<j&N3ah(m`ku?pX.&+~:_/wC~dwn^)MizBG
7  !pE^+iDQQ1yC6^,)YDKkxDd!T>\I~93>J<_`<4)A{':UrE
8
9 The library code uses lroundf() from math.h but some compilers may warn
10 about an implicit definition of it, so make sure it it actually
11 available by following the requirements from the LROUND(3) man page.
12 ---
13  src/CMakeLists.txt | 2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
17 index f743b1a..7e914f7 100644
18 --- a/src/CMakeLists.txt
19 +++ b/src/CMakeLists.txt
20 @@ -1,5 +1,5 @@
21  add_definitions("-D_BSD_SOURCE") # for htole32()
22 -add_definitions("-D_POSIX_C_SOURCE=199309L") # for nanosleep()
23 +add_definitions("-D_POSIX_C_SOURCE=200112L") # for nanosleep() and lroundf()
24  
25  # Find packages needed to build library
26  find_package(libusb-1.0 REQUIRED)
27 -- 
28 2.6.2
29