From 9c7721b0663f6837bdcdedf5f1cafa7dd554e359 Mon Sep 17 00:00:00 2001 From: mirko Date: Wed, 11 Apr 2012 21:22:25 +0000 Subject: [PATCH] [packages/dmalloc] undef macro 'strdup' dmalloc defines its own prototypes of alloc/string-functions, when compiling however with optimizations libc might turn 'strdup' into a macro which can't be overloaded that way anymore. 'undef strdup' before (re)defining. gcc error: dmalloc.h:460:7: error: expected identifier or '(' before '__extension__' git-svn-id: svn://svn.openwrt.org/openwrt/packages@31253 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- devel/dmalloc/patches/400-undef-strndup.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 devel/dmalloc/patches/400-undef-strndup.patch diff --git a/devel/dmalloc/patches/400-undef-strndup.patch b/devel/dmalloc/patches/400-undef-strndup.patch new file mode 100644 index 000000000..e7141edc4 --- /dev/null +++ b/devel/dmalloc/patches/400-undef-strndup.patch @@ -0,0 +1,10 @@ +--- dmalloc-5.5.2/dmalloc.h.3 2012-04-11 22:59:21.624323311 +0200 ++++ dmalloc-5.5.2.mod/dmalloc.h.3 2012-04-11 23:00:53.612325497 +0200 +@@ -405,6 +405,7 @@ + * + * string -> String we are duplicating. + */ ++#undef strdup + extern + char *strdup(const char *string); + #endif /* ifndef DMALLOC_STRDUP_MACRO */