Subject: pkg/34019: [patch] comms/libmal does not compile on FreeBSD 6.1
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <peter.schuller@infidyne.com>
List: pkgsrc-bugs
Date: 07/17/2006 17:50:00
>Number:         34019
>Category:       pkg
>Synopsis:       [patch] comms/libmal does not compile on FreeBSD 6.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 17 17:50:00 +0000 2006
>Originator:     Peter Schuller
>Release:        FreeBSD 6.1
>Organization:
N/A
>Environment:
>Description:
comms/libmal does not compile:

In file included from ../malsync/mal/client/unix/MAL31DBConfig.c:26:
/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"
../malsync/mal/client/unix/MAL31DBConfig.c: In function `MAL31DBConfigReadData':
../malsync/mal/client/unix/MAL31DBConfig.c:41: warning: implicit declaration of function `malloc'
gmake[2]: *** [MAL31DBConfig.lo] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/comms/libmal/work/libmal-0.40/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/comms/libmal/work/libmal-0.40'
gmake: *** [all] Error 2
*** Error code 2

>How-To-Repeat:

>Fix:
Have stdlib.h be included instead of stdlib.h on FreeBSD:

   http://hyperion.scode.org/pkgsrc/libmal-malloc.patch

Note that it does not distinguish based on the version of FreeBSD. I believe stdlib.h will always have defined malloc() in modern times, so I suspect it is not necessary. (malloc.h is not even standard AFAIK?).