diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h
index 78cff07abf801db7544fc7e30f68680246833e4b..9b51de2464378f82537d06da5b3c95dee5e82cbb 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -140,8 +140,8 @@ typedef struct ReplicationSlotCtlData
 /*
  * Pointers to shared memory
  */
-extern ReplicationSlotCtlData *ReplicationSlotCtl;
-extern ReplicationSlot *MyReplicationSlot;
+extern PGDLLIMPORT ReplicationSlotCtlData *ReplicationSlotCtl;
+extern PGDLLIMPORT ReplicationSlot *MyReplicationSlot;
 
 /* GUCs */
 extern PGDLLIMPORT int max_replication_slots;