diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 2146d7e6abd15d227ca2f35fb4af13b352347b1d..947906a280546b81a855f4ebfcb3f4c80889abcc 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -74,8 +74,8 @@
 /* in globals.c */
 /* these are marked volatile because they are set by signal handlers: */
 extern PGDLLIMPORT volatile bool InterruptPending;
-extern volatile bool QueryCancelPending;
-extern volatile bool ProcDiePending;
+extern PGDLLIMPORT volatile bool QueryCancelPending;
+extern PGDLLIMPORT volatile bool ProcDiePending;
 
 extern volatile bool ClientConnectionLost;
 
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 37eca7a139833a8fb037f86210cac95d519e523b..8b9f10b78551213c7bd5f14e3e9569212b2f17a8 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -62,7 +62,7 @@ typedef void (*shmem_startup_hook_type) (void);
 
 
 /* ipc.c */
-extern bool proc_exit_inprogress;
+extern PGDLLIMPORT bool proc_exit_inprogress;
 
 extern void proc_exit(int code) __attribute__((noreturn));
 extern void shmem_exit(int code);
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index c8ff4ebfb8ac73cf95fd7b4e49dc44a6e28a89b5..8840c791dd1d5ce8e8fe7545688d07fb51dc0ac6 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -80,7 +80,7 @@ typedef union LWLockPadded
 	LWLock		lock;
 	char		pad[LWLOCK_PADDED_SIZE];
 } LWLockPadded;
-extern LWLockPadded *MainLWLockArray;
+extern PGDLLIMPORT LWLockPadded *MainLWLockArray;
 
 /*
  * Some commonly-used locks have predefined positions within MainLWLockArray;