diff --git a/src/pmpz_arith.c b/src/pmpz_arith.c
index 6231e8b..91accce 100644
--- a/src/pmpz_arith.c
+++ b/src/pmpz_arith.c
@@ -25,6 +25,9 @@
 #include "fmgr.h"
 #include "funcapi.h"
 #include "access/hash.h"            /* for hash_any */
+#if PG_VERSION_NUM >= 90300
+#include <access/htup_details.h>    /* for heap_form_tuple */
+#endif
 
 
 /*
diff --git a/src/pmpz_roots.c b/src/pmpz_roots.c
index d771342..1ac7b86 100644
--- a/src/pmpz_roots.c
+++ b/src/pmpz_roots.c
@@ -24,6 +24,9 @@
 
 #include "fmgr.h"
 #include "funcapi.h"
+#if PG_VERSION_NUM >= 90300
+#include <access/htup_details.h>    /* for heap_form_tuple */
+#endif
 
 
 /* Functions with a more generic signature are defined in pmpz.arith.c */
diff --git a/src/pmpz_theor.c b/src/pmpz_theor.c
index ef77065..4290fc9 100644
--- a/src/pmpz_theor.c
+++ b/src/pmpz_theor.c
@@ -24,6 +24,9 @@
 
 #include "fmgr.h"
 #include "funcapi.h"
+#if PG_VERSION_NUM >= 90300
+#include <access/htup_details.h>    /* for heap_form_tuple */
+#endif
 
 
 /* Function with a more generic signature are defined in pmpz.arith.c */
