diff options
| author | Daniel Black <daniel@mariadb.org> | 2021-03-16 15:37:14 +1100 |
|---|---|---|
| committer | Daniel Black <daniel@mariadb.org> | 2021-03-16 15:37:20 +1100 |
| commit | 05244f0ad5181dad009ba1857eaa9feee31c6d63 (patch) | |
| tree | 569571e6885a3207c00313693ad32f345a7bf899 | |
| parent | 0d8f3398e51d7c02b10abd48890ba5113e353a56 (diff) | |
| download | mariadb-git-bb-10.5-danielblack-pr1764-aix-crc32.tar.gz | |
crc32c: Fix AIX compulation - ALIGN definedbb-10.5-danielblack-pr1764-aix-crc32
ALIGN was defined already:
mysys/crc32/crc32c.cc:390: warning: "ALIGN" redefined
#define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1))
In file included from /root/aix/build/include/my_global.h:543,
from /root/aix/build/mysys/crc32/crc32c.cc:22:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/sys/socket.h:788: note: this is the location of the previous definition
#define ALIGN(p) (ulong)((caddr_t)(p) + MACHINE_ALIGNMENT - 1 - \
| -rw-r--r-- | mysys/crc32/crc32c.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/crc32/crc32c.cc b/mysys/crc32/crc32c.cc index 8135c211d2e..b6c80886ec1 100644 --- a/mysys/crc32/crc32c.cc +++ b/mysys/crc32/crc32c.cc @@ -386,6 +386,10 @@ uint32_t ExtendImpl(uint32_t crc, const char* buf, size_t size) { const uint8_t *e = p + size; uint64_t l = crc ^ 0xffffffffu; +#ifdef ALIGN +#undef ALIGN +#endif + // Align n to (1 << m) byte boundary #define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1)) |
