From b9eda0261648c6b4dcc5073dbf26031441661c03 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Thu, 25 Jan 2024 13:26:39 +0100 Subject: [PATCH] glib-2.0,posix: Define _GNU_SOURCE for sincos*() Fixes https://gitlab.gnome.org/GNOME/vala/issues/1519 --- vapi/glib-2.0.vapi | 2 ++ vapi/posix.vapi | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 572f42298..c78a108d8 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1705,7 +1705,9 @@ namespace GLib { public static float sinhf (float x); public static double tanh (double x); public static float tanhf (float x); + [CCode (feature_test_macro = "_GNU_SOURCE")] public static void sincos (double x, out double sinx, out double cosx); + [CCode (feature_test_macro = "_GNU_SOURCE")] public static void sincosf (float x, out float sinx, out float cosx); public static double acosh (double x); public static float acoshf (float x); diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 8651cdc9a..caa0f41f8 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -810,9 +810,9 @@ namespace Posix { public double tanh (double x); [CCode (cheader_filename = "math.h")] public float tanhf (float x); - [CCode (cheader_filename = "math.h")] + [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")] public void sincos (double x, out double sinx, out double cosx); - [CCode (cheader_filename = "math.h")] + [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")] public void sincosf (float x, out float sinx, out float cosx); [CCode (cheader_filename = "math.h")] public double acosh (double x); -- 2.47.2