diff --git a/src/Makefile b/src/Makefile index cb8606940..1b12c3c52 100644 --- a/src/Makefile +++ b/src/Makefile @@ -83,6 +83,10 @@ ifneq (,$(findstring armv,$(uname_M))) endif endif +ifneq (,$(findstring armv,$(uname_M))) + FINAL_LIBS+=-latomic +endif + # Backwards compatibility for selecting an allocator ifeq ($(USE_TCMALLOC),yes) MALLOC=tcmalloc @@ -106,7 +110,7 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) FINAL_CXXFLAGS=$(CXX_STD) $(WARN) $(OPT) $(DEBUG) $(CXXFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -FINAL_LIBS=-lm -lcurl +FINAL_LIBS+=-lm -lcurl DEBUG=-g -ggdb # Linux ARM needs -latomic at linking time @@ -248,9 +252,9 @@ MAKECOLOR="\033[32;1m" ENDCOLOR="\033[0m" ifndef V -QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; -QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2; -QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2; +QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR); +QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR); +QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR); endif REDIS_SERVER_NAME=keydb-server diff --git a/src/replication.cpp b/src/replication.cpp index 91ec6309a..aa220c95a 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -358,8 +358,8 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { char szMvcc[128]; incrementMvccTstamp(); uint64_t mvccTstamp = getMvccTstamp(); - int cchMvccNum = snprintf(szMvcc, sizeof(szMvcc), "%lu", mvccTstamp); - int cchMvcc = snprintf(szMvcc, sizeof(szMvcc), "$%d\r\n%lu\r\n", cchMvccNum, mvccTstamp); + int cchMvccNum = snprintf(szMvcc, sizeof(szMvcc), "%" PRIu64, mvccTstamp); + int cchMvcc = snprintf(szMvcc, sizeof(szMvcc), "$%d\r\n%" PRIu64 "\r\n", cchMvccNum, mvccTstamp); cchMvcc = std::min(cchMvcc, sizeof(szMvcc)); // tricky snprintf /* Write the command to the replication backlog if any. */ diff --git a/src/server.cpp b/src/server.cpp index 33641dfec..98856a50a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3729,7 +3729,8 @@ int processCommand(client *c, int callFlags) { * link with master. */ if (FBrokenLinkToMaster() && g_pserver->repl_serve_stale_data == 0 && - !(c->cmd->flags & CMD_STALE)) + !(c->cmd->flags & CMD_STALE) + && !(g_pserver->fActiveReplica && c->cmd->proc == syncCommand)) { flagTransaction(c); addReply(c, shared.masterdownerr);