diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 9b5dba921..e06878d99 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -4,6 +4,6 @@ CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE LIB= util -SRCS= openpty.c sha2.c +SRCS= openpty.c sha2.c efun.c .include diff --git a/lib/libutil/efun.c b/lib/libutil/efun.c index 0f9019fc7..175e7c602 100644 --- a/lib/libutil/efun.c +++ b/lib/libutil/efun.c @@ -44,6 +44,7 @@ __RCSID("$NetBSD: efun.c,v 1.6 2008/04/28 20:23:02 martin Exp $"); #include #include #include +#include #include static void (*efunc)(int, const char *, ...) = err; @@ -91,6 +92,7 @@ estrdup(const char *s) return d; } +#ifndef __minix char * estrndup(const char *s, size_t len) { @@ -99,6 +101,7 @@ estrndup(const char *s, size_t len) (*efunc)(1, "Cannot copy string"); return d; } +#endif void * emalloc(size_t n) @@ -136,6 +139,7 @@ efopen(const char *p, const char *m) return fp; } +#ifndef _MINIX int easprintf(char ** __restrict ret, const char * __restrict format, ...) { @@ -156,3 +160,4 @@ evasprintf(char ** __restrict ret, const char * __restrict format, va_list ap) (*efunc)(1, "Cannot format string"); return rv; } +#endif