diff --git a/usr.bin/ftp/extern.h b/usr.bin/ftp/extern.h index 5b5acab7bfe3..a7961a5b2e92 100644 --- a/usr.bin/ftp/extern.h +++ b/usr.bin/ftp/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.81 2019/02/04 04:09:13 mrg Exp $ */ +/* $NetBSD: extern.h,v 1.82 2019/06/22 23:40:53 christos Exp $ */ /*- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. @@ -243,7 +243,14 @@ void user(int, char **); int ftp_connect(int, const struct sockaddr *, socklen_t, int); int ftp_listen(int, int); int ftp_poll(struct pollfd *, int, int); +#ifndef SMALL void *ftp_malloc(size_t); StringList *ftp_sl_init(void); void ftp_sl_add(StringList *, char *); char *ftp_strdup(const char *); +#else +#define ftp_malloc(a) malloc(a); +#define ftp_sl_init() sl_init() +#define ftp_sl_add(a, b) sl_add((a), (b)) +#define ftp_strdup(a) strdup(a) +#endif diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index ae3a286aaa4e..621f2b0f5c85 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.159 2017/11/20 21:11:36 kre Exp $ */ +/* $NetBSD: util.c,v 1.160 2019/06/22 23:40:53 christos Exp $ */ /*- * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include #ifndef lint -__RCSID("$NetBSD: util.c,v 1.159 2017/11/20 21:11:36 kre Exp $"); +__RCSID("$NetBSD: util.c,v 1.160 2019/06/22 23:40:53 christos Exp $"); #endif /* not lint */ /* @@ -1491,6 +1491,7 @@ ftp_poll(struct pollfd *fds, int nfds, int timeout) return poll(fds, nfds, timeout); } +#ifndef SMALL /* * malloc() with inbuilt error checking */ @@ -1545,3 +1546,4 @@ ftp_strdup(const char *str) err(1, "Unable to allocate memory for string copy"); return (s); } +#endif