Skip to content

Commit baa00e1

Browse files
committed
pathman: fixed an alignment bug on sparc9
1 parent 175b0c8 commit baa00e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

contrib/pg_pathman/dsm_array.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ typedef struct DsmConfig
2828

2929
static DsmConfig *dsm_cfg = NULL;
3030

31-
typedef int BlockHeader;
31+
/*
32+
* Block header
33+
*
34+
* Its size must be 4 bytes for 32bit and 8 bytes for 64bit. Otherwise it could
35+
* screw up an alignment (for example on Sparc9)
36+
*/
37+
typedef uintptr_t BlockHeader;
3238
typedef BlockHeader* BlockHeaderPtr;
3339

3440
#define FREE_BIT 0x80000000

0 commit comments

Comments
 (0)