aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--miscutils/make.c15
-rw-r--r--win32/Kbuild3
2 files changed, 16 insertions, 2 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{
diff --git a/win32/Kbuild b/win32/Kbuild
index ecd27645c..3e1f845df 100644
--- a/win32/Kbuild
+++ b/win32/Kbuild
@@ -8,8 +8,7 @@ lib-$(CONFIG_PLATFORM_MINGW32) += dirent.o
8lib-$(CONFIG_PLATFORM_MINGW32) += env.o 8lib-$(CONFIG_PLATFORM_MINGW32) += env.o
9lib-$(CONFIG_PLATFORM_MINGW32) += fnmatch.o 9lib-$(CONFIG_PLATFORM_MINGW32) += fnmatch.o
10lib-$(CONFIG_PLATFORM_MINGW32) += fsync.o 10lib-$(CONFIG_PLATFORM_MINGW32) += fsync.o
11lib-$(CONFIG_MAKE) += glob.o 11lib-$(CONFIG_PLATFORM_MINGW32) += glob.o
12lib-$(CONFIG_PDPMAKE) += glob.o
13lib-$(CONFIG_PLATFORM_MINGW32) += inet_pton.o 12lib-$(CONFIG_PLATFORM_MINGW32) += inet_pton.o
14lib-$(CONFIG_PLATFORM_MINGW32) += ioctl.o 13lib-$(CONFIG_PLATFORM_MINGW32) += ioctl.o
15lib-$(CONFIG_FEATURE_PRNG_ISAAC) += isaac.o 14lib-$(CONFIG_FEATURE_PRNG_ISAAC) += isaac.o