forked from pool/pplite
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From 92e340333ebaf1e5628ccff2dd42b1cc18950e1c Mon Sep 17 00:00:00 2001
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: Fri, 14 Mar 2025 09:57:19 +0100
|
|
Subject: [PATCH] build: fix build error with flint 3.2.0
|
|
References: https://github.com/ezaffanella/PPLite/pull/1
|
|
|
|
```
|
|
$ make V=0
|
|
CXX FLINT_Integer.lo
|
|
In file included from FLINT_Integer.cc:22:
|
|
FLINT_Integer.hh: In constructor 'pplite::FLINT_Integer::FLINT_Integer(const __mpz_struct*)':
|
|
FLINT_Integer.hh:110:25: error: 'fmpz_set_mpz' was not declared in this scope; did you mean 'fmpz_get_mpn'?
|
|
110 | : FLINT_Integer() { fmpz_set_mpz(mp, z); }
|
|
```
|
|
|
|
fmpz.h / fmpq.h evaluate the presence of the gmp-internal macro ``__GMP_H__``,
|
|
so there is a mandatory order for header files :-/
|
|
---
|
|
src/FLINT_Integer.hh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/FLINT_Integer.hh b/src/FLINT_Integer.hh
|
|
index 1d9914f..981d101 100644
|
|
--- a/src/FLINT_Integer.hh
|
|
+++ b/src/FLINT_Integer.hh
|
|
@@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#include "globals.hh"
|
|
|
|
-#include <flint/fmpz.h>
|
|
#include <gmp.h>
|
|
+#include <flint/fmpz.h>
|
|
#include <cassert>
|
|
#include <cstdlib>
|
|
#include <iostream>
|
|
--
|
|
2.48.1
|
|
|