diff --git a/src/interfaces/libpq/bcc32.mak b/src/interfaces/libpq/bcc32.mak
index 73fb1faf131fee759f401d418e6274dbe77d3b9f..067ce5410159df0703fb6c870672e0e494d40bfb 100644
--- a/src/interfaces/libpq/bcc32.mak
+++ b/src/interfaces/libpq/bcc32.mak
@@ -137,11 +137,14 @@ LIB32_OBJS= \
 	"$(INTDIR)\pthread-win32.obj"
 
 
-config: ..\..\include\pg_config.h pg_config_paths.h
+config: ..\..\include\pg_config.h ..\..\include\pg_config_os.h pg_config_paths.h
 
 ..\..\include\pg_config.h: ..\..\include\pg_config.h.win32
 	copy ..\..\include\pg_config.h.win32 ..\..\include\pg_config.h
 
+..\..\include\pg_config_os.h: ..\..\include\port\win32.h
+	copy ..\..\include\port\win32.h ..\..\include\pg_config_os.h
+
 # Have to use \# so # isn't treated as a comment, but MSVC doesn't like this
 pg_config_paths.h: bcc32.mak
 	echo \#define SYSCONFDIR "" > pg_config_paths.h