pkgsrc/pkgtools/libnbcompat/files/malloc.c
grant 706e3fa728 Initial import of libnbcompat-20030331, a portable NetBSD compatibility
library for use by the pkgsrc tools and other sources from NetBSD.
2003-03-31 05:02:17 +00:00

15 lines
233 B
C

/* $NetBSD: malloc.c,v 1.1.1.1 2003/03/31 05:02:54 grant Exp $ */
#if ! HAVE_MALLOC
#undef malloc
#include <sys/types.h>
void *malloc();
void *rpl_malloc (size_t n)
{
if (n == 0) n = 1;
return malloc(n);
}
#endif