Skip to content

Commit

Permalink
Merge branch 'unstable' into RELEASE_5
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Mar 27, 2020
2 parents f534b5b + c3d3c82 commit fa6870a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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
Expand All @@ -105,7 +109,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

ifeq ($(uname_S),SunOS)
Expand Down
4 changes: 2 additions & 2 deletions src/replication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,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<int>(cchMvcc, sizeof(szMvcc)); // tricky snprintf

/* Write the command to the replication backlog if any. */
Expand Down

0 comments on commit fa6870a

Please sign in to comment.