mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
fixed MEM_STATIC already defined in Linux Kernel mode
This commit is contained in:
@ -24,6 +24,7 @@
|
|||||||
/*-****************************************
|
/*-****************************************
|
||||||
* Compiler specifics
|
* Compiler specifics
|
||||||
******************************************/
|
******************************************/
|
||||||
|
#undef MEM_STATIC /* may be already defined from common/compiler.h */
|
||||||
#define MEM_STATIC static inline
|
#define MEM_STATIC static inline
|
||||||
|
|
||||||
/*-**************************************************************
|
/*-**************************************************************
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#define ZSTD_DEPS_NEED_MALLOC
|
#define ZSTD_DEPS_NEED_MALLOC
|
||||||
#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */
|
#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */
|
||||||
|
|
||||||
#include "mem.h" /* MEM_STATIC */
|
#include "compiler.h" /* MEM_STATIC */
|
||||||
#define ZSTD_STATIC_LINKING_ONLY
|
#define ZSTD_STATIC_LINKING_ONLY
|
||||||
#include "../zstd.h" /* ZSTD_customMem */
|
#include "../zstd.h" /* ZSTD_customMem */
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
* Updating the prefix is probably preferable, but requires a fairly large codemod,
|
* Updating the prefix is probably preferable, but requires a fairly large codemod,
|
||||||
* since this name is used everywhere.
|
* since this name is used everywhere.
|
||||||
*/
|
*/
|
||||||
|
#ifndef MEM_STATIC /* already defined in Linux Kernel mem.h */
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
# define MEM_STATIC static __inline UNUSED_ATTR
|
# define MEM_STATIC static __inline UNUSED_ATTR
|
||||||
#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
|
#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
|
||||||
@ -99,6 +100,7 @@
|
|||||||
#else
|
#else
|
||||||
# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */
|
# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* force no inlining */
|
/* force no inlining */
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
Reference in New Issue
Block a user