From b8867d0ef6bae1e13100812ac6a6f543f1115d0c Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 4 Feb 2012 16:31:02 +0000 Subject: [PATCH] There is no point in creating an entry point for emalloc(), when all the other functions are just defined in terms of ereallocz(). Fixes the sun2 build because it avoids the conflict with emalloc() from libutil. --- external/bsd/ntp/dist/include/ntp_stdlib.h | 5 ++--- external/bsd/ntp/dist/libntp/emalloc.c | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/external/bsd/ntp/dist/include/ntp_stdlib.h b/external/bsd/ntp/dist/include/ntp_stdlib.h index 2033d3961784..68dcbbe922cb 100644 --- a/external/bsd/ntp/dist/include/ntp_stdlib.h +++ b/external/bsd/ntp/dist/include/ntp_stdlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_stdlib.h,v 1.4 2012/02/04 14:56:58 he Exp $ */ +/* $NetBSD: ntp_stdlib.h,v 1.5 2012/02/04 16:31:02 christos Exp $ */ /* * ntp_stdlib.h - Prototypes for NTP lib. @@ -90,8 +90,7 @@ extern u_int32 addr2refid (sockaddr_u *); #ifndef EREALLOC_CALLSITE /* ntp_malloc.h defines */ extern void * ereallocz (void *, size_t, size_t, int); #define erealloczsite(p, n, o, z, f, l) ereallocz(p, n, o, (z)) -#define emalloc(arg) ntp_emalloc(arg) -extern void * emalloc (size_t); +#define emalloc(n) ereallocz(NULL, n, 0, FALSE) #define emalloc_zero(c) ereallocz(NULL, (c), 0, TRUE) #define erealloc(p, c) ereallocz(p, (c), 0, FALSE) #define erealloc_zero(p, n, o) ereallocz(p, n, (o), TRUE) diff --git a/external/bsd/ntp/dist/libntp/emalloc.c b/external/bsd/ntp/dist/libntp/emalloc.c index 56b995552760..8c205779abc3 100644 --- a/external/bsd/ntp/dist/libntp/emalloc.c +++ b/external/bsd/ntp/dist/libntp/emalloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: emalloc.c,v 1.1.1.2 2012/01/31 21:24:16 kardel Exp $ */ +/* $NetBSD: emalloc.c,v 1.2 2012/02/04 16:31:02 christos Exp $ */ /* * emalloc - return new memory obtained from the system. Belch if none. @@ -88,6 +88,7 @@ estrdup_impl( } +#if 0 #ifndef EREALLOC_CALLSITE void * emalloc(size_t newsz) @@ -95,4 +96,5 @@ emalloc(size_t newsz) return ereallocz(NULL, newsz, 0, FALSE); } #endif +#endif