summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorsundb <sundbcn@gmail.com>2022-02-02 03:39:10 +0800
committerGitHub <noreply@github.com>2022-02-01 21:39:10 +0200
commit948285de39e0c19463a99e73c621298d30ec6a87 (patch)
tree6ff0ba141589ecb74ca24923c83ce47ffd57822e /src/modules
parent6b5b3ca4148b058210f7c32096a6d1201a2121d9 (diff)
downloadredis-948285de39e0c19463a99e73c621298d30ec6a87.tar.gz
Fix src/modules build issue on OS X 11 (#10224)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/Makefile7
-rw-r--r--src/modules/hellocluster.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/Makefile b/src/modules/Makefile
index 3db19e79a..c4bc7eb1a 100644
--- a/src/modules/Makefile
+++ b/src/modules/Makefile
@@ -11,6 +11,13 @@ else
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
endif
+# OS X 11.x doesn't have /usr/lib/libSystem.dylib and needs an explicit setting.
+ifeq ($(uname_S),Darwin)
+ifeq ("$(wildcard /usr/lib/libSystem.dylib)","")
+LIBS = -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lsystem
+endif
+endif
+
.SUFFIXES: .c .so .xo .o
all: helloworld.so hellotype.so helloblock.so hellocluster.so hellotimer.so hellodict.so hellohook.so helloacl.so
diff --git a/src/modules/hellocluster.c b/src/modules/hellocluster.c
index 8f822e31e..a6508f837 100644
--- a/src/modules/hellocluster.c
+++ b/src/modules/hellocluster.c
@@ -76,7 +76,7 @@ int ListCommand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
void PingReceiver(RedisModuleCtx *ctx, const char *sender_id, uint8_t type, const unsigned char *payload, uint32_t len) {
RedisModule_Log(ctx,"notice","PING (type %d) RECEIVED from %.*s: '%.*s'",
type,REDISMODULE_NODE_ID_LEN,sender_id,(int)len, payload);
- RedisModule_SendClusterMessage(ctx,NULL,MSGTYPE_PONG,(unsigned char*)"Ohi!",4);
+ RedisModule_SendClusterMessage(ctx,NULL,MSGTYPE_PONG,"Ohi!",4);
RedisModuleCallReply *reply = RedisModule_Call(ctx, "INCR", "c", "pings_received");
RedisModule_FreeCallReply(reply);
}