diff --git a/net/ser/Makefile b/net/ser/Makefile index f6903a898fe5..3a389f78e79c 100644 --- a/net/ser/Makefile +++ b/net/ser/Makefile @@ -7,7 +7,7 @@ PORTNAME= ser PORTVERSION= 0.9.6 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net MASTER_SITES= http://download.berlios.de/ser/ \ http://download2.berlios.de/ser/ @@ -30,6 +30,10 @@ MANCOMPRESSED= no .include +.if !defined(WITH_SYSTEM_MALLOC) +MAKE_ENV+= "extra_defs=-DF_MALLOC -DPKG_MALLOC" +.endif + .if !defined(WITHOUT_MYSQL) USE_MYSQL= yes PLIST_SUB+= MYSQL="" diff --git a/net/ser/files/patch-Makefile.defs b/net/ser/files/patch-Makefile.defs index 5a72b5cc5f15..f8b6bc9538d4 100644 --- a/net/ser/files/patch-Makefile.defs +++ b/net/ser/files/patch-Makefile.defs @@ -19,6 +19,23 @@ $FreeBSD$ #set some vars from the environment (and not make builtins) CC := $(shell echo "$${CC}") +@@ -321,14 +322,14 @@ + -DNAME='"$(MAIN_NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \ + -DOS='"$(OS)"' -DCOMPILER='"$(CC_VER)"' -D__CPU_$(ARCH) -D__OS_$(OS) \ + -DCFG_DIR='"$(cfg-target)"'\ +- -DPKG_MALLOC \ + -DSHM_MEM -DSHM_MMAP \ + -DDNS_IP_HACK \ + -DUSE_IPV6 \ + -DUSE_MCAST \ + -DUSE_TCP \ + -DDISABLE_NAGLE \ +- -DF_MALLOC \ ++ #-DPKG_MALLOC \ ++ #-DF_MALLOC \ + #-DDBG_QM_MALLOC \ + #-DDBG_F_MALLOC \ + #-DNO_DEBUG \ @@ -464,8 +465,8 @@ found_lock_method=yes endif diff --git a/net/ser/files/patch-mem::mem.h b/net/ser/files/patch-mem::mem.h new file mode 100644 index 000000000000..81e7c3d59e99 --- /dev/null +++ b/net/ser/files/patch-mem::mem.h @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- mem/mem.h.orig ++++ mem/mem.h +@@ -122,9 +122,13 @@ + #else + # include + # define pkg_malloc(s) \ +- ( { void *v; v=malloc((s)); \ +- DBG("malloc %p size %d end %p\n", v, s, (char*)v+(s));\ +- v; } ) ++ ( { void *____v123; ____v123=malloc((s)); \ ++ DBG("malloc %p size %lu end %p\n", ____v123, (unsigned long)(s), (char*)____v123+(s));\ ++ ____v123; } ) ++# define pkg_realloc(p, s) \ ++ ( { void *____v123; ____v123=realloc(p, s); \ ++ DBG("realloc %p size %lu end %p\n", ____v123, (unsigned long)(s), (char*)____v123+(s));\ ++ ____v123; } ) + # define pkg_free(p) do{ DBG("free %p\n", (p)); free((p)); }while(0); + # define pkg_status() + #endif