diff --git a/git-compat-util.h b/git-compat-util.h
index 1930444ef0..f5b5d2e714 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -1044,6 +1044,6 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
 #define getc_unlocked(fh) getc(fh)
 #endif
 
-#endif
-
 extern int cmd_main(int, const char **);
+
+#endif