From ac834d237a1b094eecd6ac2f36aa47b52b49466f Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 8 Feb 2012 22:24:59 +0100 Subject: [PATCH] A few small BSD related fixes. --- runtest | 2 +- src/Makefile | 2 +- src/ae.c | 1 + src/debug.c | 16 ++++++++-------- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/runtest b/runtest index 2ea4d39be..0eb384c24 100755 --- a/runtest +++ b/runtest @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh TCL=tclsh8.5 which $TCL if [ "$?" != "0" ] diff --git a/src/Makefile b/src/Makefile index 659d1d7fa..a6515e614 100644 --- a/src/Makefile +++ b/src/Makefile @@ -175,7 +175,7 @@ else endif .make-arch: - -(cd ../deps && make $(DEPENDENCY_TARGETS) ARCH="$(ARCH)") + -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS) ARCH="$(ARCH)") -(echo $(ARCH) > .make-arch) # Clean local objects when allocator changes diff --git a/src/ae.c b/src/ae.c index 4c8aff9b0..4099b1259 100644 --- a/src/ae.c +++ b/src/ae.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "ae.h" #include "zmalloc.h" diff --git a/src/debug.c b/src/debug.c index 54920032f..fe21531ba 100644 --- a/src/debug.c +++ b/src/debug.c @@ -389,6 +389,14 @@ void _redisPanic(char *msg, char *file, int line) { #endif } +void bugReportStart(void) { + if (server.bug_report_start == 0) { + redisLog(REDIS_WARNING, + "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ==="); + server.bug_report_start = 1; + } +} + #ifdef HAVE_BACKTRACE static void *getMcontextEip(ucontext_t *uc) { #if defined(__FreeBSD__) @@ -420,14 +428,6 @@ static void *getMcontextEip(ucontext_t *uc) { #endif } -void bugReportStart(void) { - if (server.bug_report_start == 0) { - redisLog(REDIS_WARNING, - "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ==="); - server.bug_report_start = 1; - } -} - void logStackContent(void **sp) { int i; for (i = 15; i >= 0; i--) {