]> git.puffer.fish Git - mirror/frr.git/commitdiff
[lib] malloc.h is deprecated, try not to include it anymore
authorPaul Jakma <paul.jakma@sun.com>
Sun, 28 May 2006 08:15:46 +0000 (08:15 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Sun, 28 May 2006 08:15:46 +0000 (08:15 +0000)
2006-05-28 Paul Jakma <paul.jakma@sun.com>

* memory.c: malloc.h is deprecated in favour of stdlib.h, however
  we still need it on GNU Libc for mallinfo().

lib/ChangeLog
lib/memory.c

index b857b135f4670c1b0b190069771fd33aa273df0e..08131b031ae609bd2fbb5945266d3c9d9846eec4 100644 (file)
@@ -3,6 +3,8 @@
        * zebra.h: Include inttypes.h rather than stdint.h, best practice
          according to the autoconf manual.
          Add UINT*_MAX defines for older platforms lacking these (FBSD 4)
+       * memory.c: malloc.h is deprecated in favour of stdlib.h, however
+         we still need it on GNU Libc for mallinfo().
 
 2006-05-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
index 802c07f29049361b7ccc4bd5c112046288acfd11..1141e4057066e77fa0483e3da0dcc8a68eb6907a 100644 (file)
  */
 
 #include <zebra.h>
+/* malloc.h is generally obsolete, however GNU Libc mallinfo wants it. */
+#if defined(HAVE_STDLIB_H) || (defined(GNU_LINUX) && defined(HAVE_MALLINFO))
 #include <malloc.h>
+#endif /* !HAVE_STDLIB_H || HAVE_MALLINFO */
 
 #include "log.h"
 #include "memory.h"