Menu

#36 Add "#include sys/malloc.h" in rfc2440.c for MACs

open
nobody
5
2020-12-06
2009-02-16
Anonymous
No

An #ifdef/etc sequence should be added in rfc2440.c for MAC/DARWIN to include "sys/malloc.h" instead of "malloc.h".

Regular "malloc.h" is not defined in DARWIN, and the "make" build will fail without changing to "sys/malloc.h"

Discussion

  • Nobody/Anonymous

    ifndef __DARWIN_UNIX03

    include <malloc.h></malloc.h>

    else

    include <sys malloc.h=""></sys>

    endif

     
  • Rob Lewis

    Rob Lewis - 2015-05-18

    Thanks for advising us, though I had to change your 4th line to:
    #include <sys malloc.h=""> [wait, where did the slash go after "sys"?]
    and got a lot of warnings in the make process.
    Hope it all works.
    Kind of surprising this hasn't been incorporated in the package. </sys>

     

    Last edit: Rob Lewis 2015-05-18
  • Ryan Carsten Schmidt

    No, don't include malloc.h or sys/malloc.h on any system. On all systems, include stdlib.h.

     

Log in to post a comment.