mirror of https://mirror.osredm.com/root/redis.git
Fix alpine missing __STRING #define (#14133)
Alpine Linux doesn't provide the __STRING macro, causing build failure: Adding conditional define the macro if not already available.
This commit is contained in:
parent
90178712f6
commit
a8cde7d19c
|
@ -10,6 +10,11 @@
|
||||||
|
|
||||||
#include "vset_config.h"
|
#include "vset_config.h"
|
||||||
|
|
||||||
|
/* Define __STRING macro for portability (not available in all environments) */
|
||||||
|
#ifndef __STRING
|
||||||
|
#define __STRING(x) #x
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RM_TRY(expr) \
|
#define RM_TRY(expr) \
|
||||||
if (expr == REDISMODULE_ERR) { \
|
if (expr == REDISMODULE_ERR) { \
|
||||||
RedisModule_Log(ctx, "warning", "Could not run " __STRING(expr)); \
|
RedisModule_Log(ctx, "warning", "Could not run " __STRING(expr)); \
|
||||||
|
|
Loading…
Reference in New Issue