Menu

#4 Free BSD compile fialed (malloc.h)

open
nobody
None
5
2003-12-03
2003-12-03
Anonymous
No

When making aalib on Free BSD I get the following error:

#####################
/usr/include/malloc.h:3:2: #error "<malloc.h> has been
replaced by <stdlib.h>"
*** Error code 1

Stop in /home/xmak/install/aalib-1.4.0/src.
*** Error code 1

Stop in /home/xmak/install/aalib-1.4.0.
#####################

When I searched the net for solution I found that this
problem happens with other programs too. One
suggested sollution was to include only stdlib.h, and not
malloc.h in your source files, since replacement of
malloc.h with stdlib.h is POSIX reccomended.

I replaced all:

#include <malloc.h>

with:

#include <stdlib.h>

and it works for me.

So you would probabli want to do something similar in
your new releases. I'm not familiar about how this will
affect the build on other systems.

You can find me at: xmak@sharanet.org. Bye.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB