debian/patches: add am7xxx-bump-_POSIX_C_SOURCE-to-200112L-for-lroundf.patch
authorAntonio Ospite <ao2@ao2.it>
Tue, 17 Nov 2015 17:47:33 +0000 (18:47 +0100)
committerAntonio Ospite <ao2@ao2.it>
Tue, 17 Nov 2015 17:47:33 +0000 (18:47 +0100)
This should fix this warning from the QA site:
  W implicit-declaration /??PKGBUILDDIR??/src/am7xxx.c:1216 ...

debian/patches/am7xxx-bump-_POSIX_C_SOURCE-to-200112L-for-lroundf.patch [new file with mode: 0644]
debian/patches/series

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