diff --git a/src/replacements/fakepoll.c b/src/replacements/fakepoll.c
index a043438..b722c8a 100644
--- a/src/replacements/fakepoll.c
+++ b/src/replacements/fakepoll.c
@@ -24,6 +24,10 @@
 #include <stdarg.h>
 #include <stdio.h>

+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
 #include "replacements.h"

 #if HAVE_SYS_TYPES_H
@@ -34,10 +38,6 @@
 #include <errno.h>
 #endif /* HAVE_ERRNO_H */

-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
 #include <freetds/time.h>

 #include <string.h>

Add patch to avoid problem with getpid definition. This is a backport of: FreeTDS/freetds@c5cd068
Add patch to avoid problem with getpid definition.
This is a backport of:
FreeTDS/freetds@c5cd068
