summaryrefslogtreecommitdiff
path: root/sci-mathematics/minisat/files/minisat-2.2.1-musl.patch
blob: 3a25d5964318e7b3ef92ef6dc87bcea732d88375 (plain)
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
From 4c8afcd6bfbf2cbdb5ebe271f20503a6d34d7d49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Bar=C4=87?= <xgqt@gentoo.org>
Date: Mon, 6 Feb 2023 17:09:18 +0100
Subject: [PATCH] utils/System.*: use fpu_control only on glibc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Bug: https://github.com/vprover/vampire/pull/432
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
 minisat/utils/System.cc | 2 +-
 minisat/utils/System.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/minisat/utils/System.cc b/minisat/utils/System.cc
index 282f98ed..112708f7 100644
--- a/minisat/utils/System.cc
+++ b/minisat/utils/System.cc
@@ -97,7 +97,7 @@ double Minisat::memUsedPeak(bool /*strictlyPeak*/) { return 0; }
 
 void Minisat::setX86FPUPrecision()
 {
-#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
+#if defined(__GLIBC__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
     // Only correct FPU precision on Linux architectures that needs and supports it:
     fpu_control_t oldcw, newcw;
     _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
diff --git a/minisat/utils/System.h b/minisat/utils/System.h
index a51d4c2e..189fcbff 100644
--- a/minisat/utils/System.h
+++ b/minisat/utils/System.h
@@ -21,7 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
 #ifndef Minisat_System_h
 #define Minisat_System_h
 
-#if defined(__linux__)
+#if defined(__GLIBC__)
 #include <fpu_control.h>
 #endif