summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/jq/builtinc.patch
blob: 943edbc9d2dfbb43c22f7f4f76fcfde303e44047 (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/src/builtin.c b/src/builtin.c
old mode 100644
new mode 100755
index c6c8c2e..e336472
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -185,7 +185,7 @@ static jv f_modf(jq_state *jq, jv input) {
   return jv_array_append(ret, jv_number(i));
 }
 #endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
 static jv f_lgamma_r(jq_state *jq, jv input) {
   if (jv_get_kind(input) != JV_KIND_NUMBER) {
     return type_error(input, "number required");
@@ -1581,7 +1581,7 @@ static const struct cfunction function_list[] = {
 #ifdef HAVE_MODF
   {(cfunction_ptr)f_modf,"modf", 1},
 #endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
   {(cfunction_ptr)f_lgamma_r,"lgamma_r", 1},
 #endif
   {(cfunction_ptr)f_plus, "_plus", 3},
diff --git a/src/builtin.c b/src/builtin.c
old mode 100644
new mode 100755
index c6c8c2e..e336472
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -185,7 +185,7 @@ static jv f_modf(jq_state *jq, jv input) {
   return jv_array_append(ret, jv_number(i));
 }
 #endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
 static jv f_lgamma_r(jq_state *jq, jv input) {
   if (jv_get_kind(input) != JV_KIND_NUMBER) {
     return type_error(input, "number required");
@@ -1581,7 +1581,7 @@ static const struct cfunction function_list[] = {
 #ifdef HAVE_MODF
   {(cfunction_ptr)f_modf,"modf", 1},
 #endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
   {(cfunction_ptr)f_lgamma_r,"lgamma_r", 1},
 #endif
   {(cfunction_ptr)f_plus, "_plus", 3},