Skip to content

Commit 724890f

Browse files
Include necessary header files in radixtree.h.
When #include'ing radixtree.h with RT_SHMEM, it could happen to raise compiler errors due to missing some declarations of types and functions. This commit also removes the inclusion of postgres.h since it's against our usual convention. Backpatch to v17, where radixtree.h was introduced. Reviewed-by: Heikki Linnakangas, Álvaro Herrera Discussion: https://postgr.es/m/CAD21AoCU9YH%2Bb9Rr8YRw7UjmB%3D1zh8GKQkWNiuN9mVhMvkyrRg%40mail.gmail.com Backpatch-through: 17
1 parent 36d0229 commit 724890f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/include/lib/radixtree.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@
151151
*-------------------------------------------------------------------------
152152
*/
153153

154-
#include "postgres.h"
155-
156154
#include "nodes/bitmapset.h"
157155
#include "port/pg_bitutils.h"
158156
#include "port/simd.h"
159157
#include "utils/dsa.h"
160158
#include "utils/memutils.h"
159+
#ifdef RT_SHMEM
160+
#include "miscadmin.h"
161+
#include "storage/lwlock.h"
162+
#endif
161163

162164
/* helpers */
163165
#define RT_MAKE_PREFIX(a) CppConcat(a,_)

0 commit comments

Comments
 (0)