Fix header inclusion order in pg_receivewal.c
authorMichael Paquier <michael@paquier.xyz>
Fri, 18 Mar 2022 01:38:16 +0000 (10:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 18 Mar 2022 01:38:16 +0000 (10:38 +0900)
lz4frame.h was getting declared after the headers specific to Postgres,
but it needs to be included between postgres_fe.h and the internal
headers.

Issue introduced by babbbb5.

Reported-by: Justin Prysby
Discussion: https://postgr.es/m/20220317111220.GI28503@telsasoft.com

src/bin/pg_basebackup/pg_receivewal.c

index e2ceafeb0f59ae191b45d78107730da8c8f18321..8d2c1e6ce01cbcf272f1ff0b1ba0d8f4fa3e8ee4 100644 (file)
 #include <signal.h>
 #include <sys/stat.h>
 #include <unistd.h>
+
+#ifdef USE_LZ4
+#include <lz4frame.h>
+#endif
 #ifdef HAVE_LIBZ
 #include <zlib.h>
 #endif
 #include "receivelog.h"
 #include "streamutil.h"
 
-#ifdef USE_LZ4
-#include "lz4frame.h"
-#endif
-
 /* Time to sleep between reconnection attempts */
 #define RECONNECT_SLEEP_TIME 5