Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
948285de
Unverified
Commit
948285de
authored
Feb 02, 2022
by
sundb
Committed by
GitHub
Feb 01, 2022
Browse files
Fix src/modules build issue on OS X 11 (#10224)
parent
6b5b3ca4
Changes
2
Show whitespace changes
Inline
Side-by-side
src/modules/Makefile
View file @
948285de
...
...
@@ -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
...
...
src/modules/hellocluster.c
View file @
948285de
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment