diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2017-09-26 00:46:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 00:46:14 -0700 |
commit | 5ed3fd8cb146daba2fe69d8ad89ac9ad32b6630b (patch) | |
tree | 4b1a551f95e2897a27579bff6ec23cd49891846a /src/util | |
parent | 75728d632b9ce5d8c75bbf208ef788bf7ce78f9e (diff) |
Fix build for old GMP version (#1114)
Older versions of GMP in combination with newer versions of GCC and
C++11 cause errors [0]. This commit adds the necessary includes of
<cstddef>.
[0] https://gcc.gnu.org/gcc-4.9/porting_to.html
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/gmp_util.h | 7 | ||||
-rw-r--r-- | src/util/rational_gmp_imp.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/util/gmp_util.h b/src/util/gmp_util.h index 2e1ccbc6a..2a15d7a7d 100644 --- a/src/util/gmp_util.h +++ b/src/util/gmp_util.h @@ -20,6 +20,13 @@ #ifndef __CVC4__GMP_UTIL_H #define __CVC4__GMP_UTIL_H +/* + * Older versions of GMP in combination with newer versions of GCC and C++11 + * cause errors: https://gcc.gnu.org/gcc-4.9/porting_to.html + * Including <cstddef> is a workaround for this issue. + */ +#include <cstddef> + #include <gmpxx.h> namespace CVC4 { diff --git a/src/util/rational_gmp_imp.h b/src/util/rational_gmp_imp.h index e0eba8ad9..e731f3c2f 100644 --- a/src/util/rational_gmp_imp.h +++ b/src/util/rational_gmp_imp.h @@ -20,6 +20,13 @@ #ifndef __CVC4__RATIONAL_H #define __CVC4__RATIONAL_H +/* + * Older versions of GMP in combination with newer versions of GCC and C++11 + * cause errors: https://gcc.gnu.org/gcc-4.9/porting_to.html + * Including <cstddef> is a workaround for this issue. + */ +#include <cstddef> + #include <gmp.h> #include <string> |