You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.9 KiB

Index: RedisModulesSDK/rmutil/sdsalloc.h
--- RedisModulesSDK/rmutil/sdsalloc.h.orig 2018-04-25 23:04:40.000000000 +0200
+++ RedisModulesSDK/rmutil/sdsalloc.h 2018-04-25 23:05:18.105560000 +0200
@@ -36,12 +36,7 @@
* the include of your alternate allocator if needed (not needed in order
* to use the default libc allocator). */
-#if defined(__MACH__)
#include <stdlib.h>
-#else
-#include <malloc.h>
-#endif
-//#include "zmalloc.h"
#define s_malloc malloc
#define s_realloc realloc
#define s_free free
Index: src/Makefile
--- src/Makefile.orig 2018-04-25 23:04:39.000000000 +0200
+++ src/Makefile 2018-04-25 23:05:51.424000000 +0200
@@ -10,14 +10,8 @@
# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-# Compile flags for linux / osx
-ifeq ($(uname_S),Linux)
- SHOBJ_CFLAGS ?= -fno-common -g -ggdb
- SHOBJ_LDFLAGS ?= -shared -Bsymbolic
-else
- SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
- SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
-endif
+SHOBJ_CFLAGS ?= -fno-common
+SHOBJ_LDFLAGS ?= -shared -Bsymbolic
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -std=gnu99 -DREDIS_MODULE_TARGET
all: rmutil redis-tsdb-module.so
@@ -26,7 +20,7 @@
$(MAKE) -C $(RMUTIL_LIBDIR)
redis-tsdb-module.so: rmutil module.o tsdb.o compaction.o rdb.o chunk.o parse_policies.o config.o
- $(LD) -o $@ module.o tsdb.o rdb.o compaction.o chunk.o parse_policies.o config.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc
+ $(CC) -o $@ module.o tsdb.o rdb.o compaction.o chunk.o parse_policies.o config.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc
clean:
rm -rf *.xo *.so *.o ./tests_runner
@@ -47,4 +41,4 @@
mkdir -p ../build
ramp pack -m "`pwd`/../ramp_manifest.yml" -v -o "../build/redis-tsdb-module.{os}-{architecture}.latest.zip" "`pwd`/redis-tsdb-module.so"
-.PHONY: package tests unittests clean all
\ No newline at end of file
+.PHONY: package tests unittests clean all