aboutsummaryrefslogtreecommitdiff
path: root/miscutils/make.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-08-24 15:02:14 +0100
committerRon Yorston <rmy@pobox.com>2023-08-24 15:02:14 +0100
commit8d70faa33f782504838d0da8892f978d17adcdec (patch)
tree44044f174f3a215ad045e4ee6222d857e262e0f6 /miscutils/make.c
parentf4f0515429d8ace3c3314ee0e823205d8044f2ac (diff)
downloadbusybox-w32-8d70faa33f782504838d0da8892f978d17adcdec.tar.gz
busybox-w32-8d70faa33f782504838d0da8892f978d17adcdec.tar.bz2
busybox-w32-8d70faa33f782504838d0da8892f978d17adcdec.zip
make: fix POSIX build
If upstream BusyBox had a 'make' applet a native build with it enabled should match the corresponding build from the busybox-w32 source. Make it so.
Diffstat (limited to 'miscutils/make.c')
-rw-r--r--miscutils/make.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/miscutils/make.c b/miscutils/make.c
index 7e156e302..a2cd03707 100644
--- a/miscutils/make.c
+++ b/miscutils/make.c
@@ -336,6 +336,21 @@ auto_concat(const char *s1, const char *s2)
336 return auto_string(xasprintf("%s%s", s1, s2)); 336 return auto_string(xasprintf("%s%s", s1, s2));
337} 337}
338 338
339#if !ENABLE_PLATFORM_MINGW32
340/*
341 * Append a word to a space-separated string of words. The first
342 * call should use a NULL pointer for str, subsequent calls should
343 * pass an allocated string which will be freed.
344 */
345static char *
346xappendword(const char *str, const char *word)
347{
348 char *newstr = str ? xasprintf("%s %s", str, word) : xstrdup(word);
349 free((void *)str);
350 return newstr;
351}
352#endif
353
339static unsigned int 354static unsigned int
340getbucket(const char *name) 355getbucket(const char *name)
341{ 356{