Bug: https://bugs.gentoo.org/883237
--- a/repmgr-client.c
+++ b/repmgr-client.c
@@ -54,6 +54,8 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include <signal.h>
+#include <sys/types.h>
+#include <pwd.h>
 
 
 #include "repmgr.h"
