[MPlayer-dev-eng] [PATCH] libdts FreeBSD problem

Dan Villiom Podlaski Christiansen danchr at daimi.au.dk
Thu Aug 12 17:27:10 CEST 2004


malloc() is required by the C standard to be in stdlib.h, and including 
malloc.h doesn't work on Darwin either. I'd suggest simply replacing 
<malloc.h> with <stdlib.h> or, in this case, remove the include completely.

Bohdan Horst wrote:

>FreeBSD 5.2.1
>gcc version 3.3.3 [FreeBSD] 20031106
>
>In file included from dtsdec.c:31:
>/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"
>gmake[1]: *** [dtsdec.o] Error 1
>
>
>patch proposal (i know.. wrong list..:) :
>
>--- dtsdec.c.orig       Thu Aug 12 16:16:39 2004
>+++ dtsdec.c    Thu Aug 12 16:16:24 2004
>@@ -28,7 +28,10 @@
>
> #include <stdlib.h>
> #include <string.h>
>+
>+#ifdef HAVE_MALLOC_H
> #include <malloc.h>
>+#endif
>
> #define INBUF_SIZE 4096
> #define BUFFER_SIZE 4096
>
>
>regards
>
>  
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3727 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040812/7e89a3f3/attachment.bin>


More information about the MPlayer-dev-eng mailing list