blob: 82a01f732e1a4f6be653db5c0cbb4bd342a210e2 [file] [log] [blame]
Andrew Geisslerd5838332022-05-27 11:33:10 -05001From e10a73de254b570bbc29b26423dbb86b4265bb05 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 16:53:06 +0800
William A. Kennington IIIac69b482021-06-02 12:28:27 -07004Subject: [PATCH] test-json.c: define M_PIl
Brad Bishop19323692019-04-05 15:28:33 -04005
6Fix the following compile failure:
7src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'?
8
9Upstream-Status: Inappropriate [musl specific]
10
Andrew Geisslerd5838332022-05-27 11:33:10 -050011This is fixed upstream where systemd no longer needs M_PIl so it could
12be dropped when upgrading to 251+ see
13https://github.com/systemd/systemd/commit/f9a1fd2a3b2d8212ba84ef1c3b55657ced34475e
14
Brad Bishop19323692019-04-05 15:28:33 -040015Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
William A. Kennington IIIac69b482021-06-02 12:28:27 -070016
Brad Bishop19323692019-04-05 15:28:33 -040017---
18 src/test/test-json.c | 4 ++++
19 1 file changed, 4 insertions(+)
20
Andrew Geisslerd5838332022-05-27 11:33:10 -050021diff --git a/src/test/test-json.c b/src/test/test-json.c
22index b385edc269..5e5830238c 100644
Brad Bishop19323692019-04-05 15:28:33 -040023--- a/src/test/test-json.c
24+++ b/src/test/test-json.c
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000025@@ -14,6 +14,10 @@
Brad Bishopc342db32019-05-15 21:57:59 -040026 #include "tests.h"
Brad Bishop19323692019-04-05 15:28:33 -040027 #include "util.h"
28
29+#ifndef M_PIl
30+#define M_PIl 3.141592653589793238462643383279502884L
31+#endif
32+
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000033 static void test_tokenizer_one(const char *data, ...) {
Brad Bishop19323692019-04-05 15:28:33 -040034 unsigned line = 0, column = 0;
35 void *state = NULL;