diff --git a/src/pl/plperl/SPI.xs b/src/pl/plperl/SPI.xs
index 716d9a1e47b8bca663022b3ff364c3cdb763424e..8b52bd437823a3597cc937c8bf07759022174954 100644
--- a/src/pl/plperl/SPI.xs
+++ b/src/pl/plperl/SPI.xs
@@ -1,4 +1,5 @@
 /* this must be first: */
+#define PLPERL_HAVE_UID_GID
 #include "postgres.h"
 
 /* perl stuff */