diff options
| author | rillig <rillig@NetBSD.org> | 2020-08-29 16:47:45 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-08-29 16:47:45 +0000 |
| commit | c31d73982933c6fc55ca72b1073368f8ed12c679 (patch) | |
| tree | f9aad17e5a7dfcfbc21cb985dbf9bcb173d281e4 /usr.bin/make/make_malloc.c | |
| parent | 0686a71ee7f6aa3589f7d968ec5702bcb8a78cf6 (diff) | |
make(1): fix build with -DUSE_EMALLOC
Diffstat (limited to 'usr.bin/make/make_malloc.c')
| -rw-r--r-- | usr.bin/make/make_malloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/make/make_malloc.c b/usr.bin/make/make_malloc.c index 5e40070482e..01635f22fac 100644 --- a/usr.bin/make/make_malloc.c +++ b/usr.bin/make/make_malloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.c,v 1.16 2020/08/29 11:24:54 rillig Exp $ */ +/* $NetBSD: make_malloc.c,v 1.17 2020/08/29 16:47:45 rillig Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #ifdef MAKE_NATIVE #include <sys/cdefs.h> -__RCSID("$NetBSD: make_malloc.c,v 1.16 2020/08/29 11:24:54 rillig Exp $"); +__RCSID("$NetBSD: make_malloc.c,v 1.17 2020/08/29 16:47:45 rillig Exp $"); #endif #include <stdio.h> @@ -92,13 +92,6 @@ bmake_strldup(const char *str, size_t len) return p; } -/* Allocate a string from start up to but excluding end. */ -char * -bmake_strsedup(const char *start, const char *end) -{ - return bmake_strldup(start, (size_t)(end - start)); -} - /* * bmake_realloc -- * realloc, but die on error. @@ -111,3 +104,10 @@ bmake_realloc(void *ptr, size_t size) return ptr; } #endif + +/* Allocate a string from start up to but excluding end. */ +char * +bmake_strsedup(const char *start, const char *end) +{ + return bmake_strldup(start, (size_t)(end - start)); +} |
