agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
Subject: [PATCH] fix s_lock_test compile
Date: Wed, 24 Jan 2024 12:10:27 +0100

---
 src/backend/storage/lmgr/Makefile | 2 +-
 src/backend/storage/lmgr/s_lock.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/backend/storage/lmgr/Makefile b/src/backend/storage/lmgr/Makefile
index 81da6ee13a..89cbb8de49 100644
--- a/src/backend/storage/lmgr/Makefile
+++ b/src/backend/storage/lmgr/Makefile
@@ -34,7 +34,7 @@ endif
 s_lock_test: s_lock.c $(top_builddir)/src/common/libpgcommon.a $(top_builddir)/src/port/libpgport.a
 	$(CC) $(CPPFLAGS) $(CFLAGS) -DS_LOCK_TEST=1 $(srcdir)/s_lock.c \
 		$(TASPATH) -L $(top_builddir)/src/common -lpgcommon \
-		-L $(top_builddir)/src/port -lpgport -o s_lock_test
+		-L $(top_builddir)/src/port -lpgport -lm -o s_lock_test
 
 # see notes in src/backend/parser/Makefile
 lwlocknames.c: lwlocknames.h
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c
index 0e5f7ab0b9..a47027eb63 100644
--- a/src/backend/storage/lmgr/s_lock.c
+++ b/src/backend/storage/lmgr/s_lock.c
@@ -61,6 +61,11 @@
 #define MIN_DELAY_USEC		1000L
 #define MAX_DELAY_USEC		1000000L
 
+#ifdef S_LOCK_TEST
+static uint32 local_my_wait_event_info;
+uint32 *my_wait_event_info = &local_my_wait_event_info;
+
+#endif
 
 slock_t		dummy_spinlock;
 
-- 
2.39.2


--d3ajbbrvahinm3ld--





view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH] fix s_lock_test compile
  In-Reply-To: <no-message-id-77978@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox