diff --git a/src/modules/Postgres/pgresult.c b/src/modules/Postgres/pgresult.c
index 558541ed4650c056eb1f48fb6fdc3b78cf5efa19..74c1ef646e36cac7723d71710530a50a3f848101 100644
--- a/src/modules/Postgres/pgresult.c
+++ b/src/modules/Postgres/pgresult.c
@@ -76,6 +76,7 @@
 #include "mapping.h"
 #include "builtin_functions.h"
 #include "module_support.h"
+#include "pike_types.h"
 
 /* <server/postgres_fe.h> doesn't suffice to be able to include
  * <server/catalog/pg_type.h>.