--- a/src/pmpz_arith.c
+++ b/src/pmpz_arith.c
@@ -28,6 +28,9 @@
 #if PG_VERSION_NUM >= 90300
 #include <access/htup_details.h>    /* for heap_form_tuple */
 #endif
+#if PG_VERSION_NUM >= 100000
+#include <utils/fmgrprotos.h>       /* for hashint8 */
+#endif
 
 
 /*
