]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Tidy up #ifdef USE_INJECTION_POINTS guards
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Apr 2026 13:18:31 +0000 (16:18 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Apr 2026 13:18:31 +0000 (16:18 +0300)
Remove unnecessary #ifdef guard around the function prototypes; they
are already inside a larger #ifdef block. Move #include "subsystems.h"
inside the USE_INJECTION_POINTS guard; it's needed for
InjectionPointShmemCallbacks, which is a also inside the guard.

Reported-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://www.postgresql.org/message-id/87y0iz2c1v.fsf@wibble.ilmari.org

src/backend/utils/misc/injection_point.c

index aa455c62bcc0872b1770ffd3eb4d145cb37e00bb..9d30843a1118ea993938d306955ff8dbebc346b5 100644 (file)
@@ -17,7 +17,6 @@
  */
 #include "postgres.h"
 
-#include "storage/subsystems.h"
 #include "utils/injection_point.h"
 
 #ifdef USE_INJECTION_POINTS
@@ -29,6 +28,7 @@
 #include "storage/fd.h"
 #include "storage/lwlock.h"
 #include "storage/shmem.h"
+#include "storage/subsystems.h"
 #include "utils/hsearch.h"
 #include "utils/memutils.h"
 
@@ -110,10 +110,8 @@ typedef struct InjectionPointCacheEntry
 
 static HTAB *InjectionPointCache = NULL;
 
-#ifdef USE_INJECTION_POINTS
 static void InjectionPointShmemRequest(void *arg);
 static void InjectionPointShmemInit(void *arg);
-#endif
 
 /*
  * injection_point_cache_add