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:
lerman25 2025-06-17 16:50:35 +03:00 committed by GitHub
parent 90178712f6
commit a8cde7d19c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,11 @@
#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) \
if (expr == REDISMODULE_ERR) { \
RedisModule_Log(ctx, "warning", "Could not run " __STRING(expr)); \