summaryrefslogtreecommitdiff
path: root/media-radio/tlf/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-04 22:09:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-04 22:09:40 +0100
commitcfd874bb4cf6ed8fa9b0d38cc3a81b33a793ebc8 (patch)
treec36498bd25bbb26ccef7b7e8e9a20bc0b7b0b938 /media-radio/tlf/files
parenta4a6bfb13b5393e584d42ef735796caa2a87c831 (diff)
gentoo auto-resync : 04:07:2023 - 22:09:40
Diffstat (limited to 'media-radio/tlf/files')
-rw-r--r--media-radio/tlf/files/tlf-1.4.1-pi.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/media-radio/tlf/files/tlf-1.4.1-pi.patch b/media-radio/tlf/files/tlf-1.4.1-pi.patch
new file mode 100644
index 000000000000..586ce973cc1a
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-pi.patch
@@ -0,0 +1,47 @@
+# As C standards does not define M_PI or M_PI_2 provide a fallback
+# bug 907442
+diff --git a/src/muf.c b/src/muf.c
+index 6671651..1f880fd 100644
+--- a/src/muf.c
++++ b/src/muf.c
+@@ -32,6 +32,10 @@
+ #include "tlf_panel.h"
+ #include "ui_utils.h"
+
++#ifndef M_PI_2
++ # define M_PI_2 1.57079632679489661923 /* pi/2 */
++#endif
++
+
+ // message splitters:
+ // line[0] - original line, content can be modified in-place
+diff --git a/src/qrb.h b/src/qrb.h
+index 89d3f30..0120de0 100644
+--- a/src/qrb.h
++++ b/src/qrb.h
+@@ -21,6 +21,10 @@
+ #ifndef QRB_H
+ #define QRB_H
+
++#ifndef M_PI
++ # define M_PI 3.14159265358979323846 /* pi */
++#endif
++
+ #define ARC_IN_KM 111.2
+ #define RADIAN (180.0 / M_PI)
+
+diff --git a/src/sunup.c b/src/sunup.c
+index b1186dd..7412c06 100644
+--- a/src/sunup.c
++++ b/src/sunup.c
+@@ -23,6 +23,10 @@
+
+ #include "get_time.h"
+
++#ifndef M_PI
++ # define M_PI 3.14159265358979323846 /* pi */
++#endif
++
+ #define RADIAN (180.0 / M_PI)
+
+