diff options
author | paul <paul> | 2006-05-28 08:15:46 +0000 |
---|---|---|
committer | paul <paul> | 2006-05-28 08:15:46 +0000 |
commit | 12a1ab66c5b0b5179642a0cd32a7b99549479d29 (patch) | |
tree | 128e5c7931c22f960ce81f73d6a70005eb0117ca /lib | |
parent | 5e1562fb2a616f0b59af24924f38f01b991887d7 (diff) | |
download | quagga-12a1ab66c5b0b5179642a0cd32a7b99549479d29.tar.bz2 quagga-12a1ab66c5b0b5179642a0cd32a7b99549479d29.tar.xz |
[lib] malloc.h is deprecated, try not to include it anymore
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().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ChangeLog | 2 | ||||
-rw-r--r-- | lib/memory.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index b857b135..08131b03 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -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> diff --git a/lib/memory.c b/lib/memory.c index 802c07f2..1141e405 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -21,7 +21,10 @@ */ #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" |