Files
macports-ports/net/tf/files/patch-src-malloc.c.diff
Ryan Carsten Schmidt c8e95426db tf: Fix implicit declaration of functions
Closes: https://trac.macports.org/ticket/61556

New versions of clang and gcc default to -fno-common which fails on this
code due to multiple definitions of _world_decl. Fix this with -fcommon.

Also modernize checksums, add modeline, and avoid HTTP redirects.
2024-08-02 18:32:36 -05:00

17 lines
720 B
Diff

Fix:
error: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Werror,-Wimplicit-function-declaration]
error: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
error: syntax error before 'mmalloc_base'
--- src/malloc.c.orig 2008-03-30 23:45:07.000000000 +0100
+++ src/malloc.c 2008-03-30 23:45:25.000000000 +0100
@@ -7,6 +7,8 @@
************************************************************************/
static const char RCSid[] = "$Id: malloc.c,v 35004.22 2007/01/13 23:12:39 kkeys Exp $";
+#include <stdlib.h>
+#include <sys/types.h>
#include "tfconfig.h"
#include "port.h"
#include "signals.h"