Skip to content

Commit f8c7f1d

Browse files
authored
Fix unnecessary macro redefintion warnings from zstd (#81917)
Co-authored-by: Andrew Krieger <[email protected]>
1 parent 92cf853 commit f8c7f1d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/third-party/zstd/common/allocations.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */
1616

1717
#include "compiler.h" /* MEM_STATIC */
18+
#ifndef ZSTD_STATIC_LINKING_ONLY
1819
#define ZSTD_STATIC_LINKING_ONLY
20+
#endif
1921
#include "../zstd.h" /* ZSTD_customMem */
2022

2123
#ifndef ZSTD_ALLOCATIONS_H

src/third-party/zstd/common/error_private.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
* Customization (error_public.h)
4040
******************************************/
4141
typedef ZSTD_ErrorCode ERR_enum;
42+
#ifdef PREFIX
43+
#undef PREFIX
44+
#endif
4245
#define PREFIX(name) ZSTD_error_##name
4346

4447

src/third-party/zstd/common/zstd_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
#include "mem.h"
2525
#include "debug.h" /* assert, DEBUGLOG, RAWLOG, g_debuglevel */
2626
#include "error_private.h"
27+
#ifndef ZSTD_STATIC_LINKING_ONLY
2728
#define ZSTD_STATIC_LINKING_ONLY
29+
#endif
2830
#include "../zstd.h"
2931
#define FSE_STATIC_LINKING_ONLY
3032
#include "fse.h"

0 commit comments

Comments
 (0)