From 8201aea90c2b171808c65836fcce4f29b22a9dbb Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Fri, 4 Feb 2011 13:11:53 -0500
Subject: [PATCH] Avoid including postgres.h in frontend compiles of src/port.

This isn't kosher, and doesn't play nicely with my recent changes to the
Makefile in this directory.
---
 src/port/dirent.c     | 5 +++++
 src/port/pipe.c       | 4 ++++
 src/port/win32error.c | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/port/dirent.c b/src/port/dirent.c
index 9e1d1317efc..6219ccb4694 100644
--- a/src/port/dirent.c
+++ b/src/port/dirent.c
@@ -13,7 +13,12 @@
  *-------------------------------------------------------------------------
  */
 
+#ifndef FRONTEND
 #include "postgres.h"
+#else
+#include "postgres_fe.h"
+#endif
+
 #include <dirent.h>
 
 
diff --git a/src/port/pipe.c b/src/port/pipe.c
index 0963cbba78a..95839c65830 100644
--- a/src/port/pipe.c
+++ b/src/port/pipe.c
@@ -15,7 +15,11 @@
  *-------------------------------------------------------------------------
  */
 
+#ifndef FRONTEND
 #include "postgres.h"
+#else
+#include "postgres_fe.h"
+#endif
 
 #ifdef WIN32
 int
diff --git a/src/port/win32error.c b/src/port/win32error.c
index 5dfb6941804..4b3b1ea7d6e 100644
--- a/src/port/win32error.c
+++ b/src/port/win32error.c
@@ -11,7 +11,11 @@
  *-------------------------------------------------------------------------
  */
 
+#ifndef FRONTEND
 #include "postgres.h"
+#else
+#include "postgres_fe.h"
+#endif
 
 static const struct
 {
-- 
GitLab