From cf0fa4d1392b7dc7eb8d37206c111f76af67e0e9 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 8 Jan 2020 14:01:18 +0000 Subject: Build fixes - Update configuration files - Omit unnecessary libraries - Replace fake stime(2) with fake clock_settime(2) --- Makefile.flags | 2 ++ configs/mingw32_defconfig | 9 +++++++-- configs/mingw64_defconfig | 9 +++++++-- include/mingw.h | 2 +- win32/mingw.c | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile.flags b/Makefile.flags index 66f28874e..ec46c4f4f 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -148,6 +148,7 @@ EXEEXT = .exe LDLIBS += userenv psapi ws2_32 endif +ifneq ($(CONFIG_PLATFORM_MINGW32),y) # Android has no separate crypt library # gcc-4.2.1 fails if we try to feed C source on stdin: # echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc - @@ -160,6 +161,7 @@ LDLIBS += m rt endif # libm may be needed for dc, awk, ntpd # librt may be needed for clock_gettime() +endif # libpam may use libpthread, libdl and/or libaudit. # On some platforms that requires an explicit -lpthread, -ldl, -laudit. diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig index ccc708172..b8a8b7e60 100644 --- a/configs/mingw32_defconfig +++ b/configs/mingw32_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.31.0.git -# Mon May 27 11:58:04 2019 +# Busybox version: 1.32.0.git +# Wed Jan 8 12:31:30 2020 # CONFIG_HAVE_DOT_CONFIG=y # CONFIG_PLATFORM_POSIX is not set @@ -94,6 +94,7 @@ CONFIG_DEBUG=y # CONFIG_DEBUG_SANITIZE is not set # CONFIG_UNIT_TEST is not set # CONFIG_WERROR is not set +# CONFIG_WARN_SIMPLE_MSG is not set CONFIG_NO_DEBUG_LIB=y # CONFIG_DMALLOC is not set # CONFIG_EFENCE is not set @@ -476,6 +477,7 @@ CONFIG_FEATURE_FIND_SIZE=y CONFIG_FEATURE_FIND_PRUNE=y CONFIG_FEATURE_FIND_QUIT=y CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_EMPTY=y CONFIG_FEATURE_FIND_PATH=y CONFIG_FEATURE_FIND_REGEX=y # CONFIG_FEATURE_FIND_CONTEXT is not set @@ -655,6 +657,7 @@ CONFIG_XXD=y # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set # CONFIG_FEATURE_MDEV_EXEC is not set # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_FEATURE_MDEV_DAEMON is not set # CONFIG_MESG is not set # CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set # CONFIG_MKE2FS is not set @@ -706,6 +709,7 @@ CONFIG_REV=y # CONFIG_SWITCH_ROOT is not set # CONFIG_TASKSET is not set # CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_FEATURE_TASKSET_CPULIST is not set # CONFIG_UEVENT is not set # CONFIG_UMOUNT is not set # CONFIG_FEATURE_UMOUNT_ALL is not set @@ -957,6 +961,7 @@ CONFIG_SSL_CLIENT=y # CONFIG_FEATURE_TELNETD_INETD_WAIT is not set # CONFIG_TFTP is not set # CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set # CONFIG_TFTPD is not set # CONFIG_FEATURE_TFTP_GET is not set # CONFIG_FEATURE_TFTP_PUT is not set diff --git a/configs/mingw64_defconfig b/configs/mingw64_defconfig index 9af0e6db4..aa8bcc518 100644 --- a/configs/mingw64_defconfig +++ b/configs/mingw64_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.31.0.git -# Mon May 27 11:58:04 2019 +# Busybox version: 1.32.0.git +# Wed Jan 8 12:31:30 2020 # CONFIG_HAVE_DOT_CONFIG=y # CONFIG_PLATFORM_POSIX is not set @@ -94,6 +94,7 @@ CONFIG_DEBUG=y # CONFIG_DEBUG_SANITIZE is not set # CONFIG_UNIT_TEST is not set # CONFIG_WERROR is not set +# CONFIG_WARN_SIMPLE_MSG is not set CONFIG_NO_DEBUG_LIB=y # CONFIG_DMALLOC is not set # CONFIG_EFENCE is not set @@ -476,6 +477,7 @@ CONFIG_FEATURE_FIND_SIZE=y CONFIG_FEATURE_FIND_PRUNE=y CONFIG_FEATURE_FIND_QUIT=y CONFIG_FEATURE_FIND_DELETE=y +CONFIG_FEATURE_FIND_EMPTY=y CONFIG_FEATURE_FIND_PATH=y CONFIG_FEATURE_FIND_REGEX=y # CONFIG_FEATURE_FIND_CONTEXT is not set @@ -655,6 +657,7 @@ CONFIG_XXD=y # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set # CONFIG_FEATURE_MDEV_EXEC is not set # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_FEATURE_MDEV_DAEMON is not set # CONFIG_MESG is not set # CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set # CONFIG_MKE2FS is not set @@ -706,6 +709,7 @@ CONFIG_REV=y # CONFIG_SWITCH_ROOT is not set # CONFIG_TASKSET is not set # CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_FEATURE_TASKSET_CPULIST is not set # CONFIG_UEVENT is not set # CONFIG_UMOUNT is not set # CONFIG_FEATURE_UMOUNT_ALL is not set @@ -957,6 +961,7 @@ CONFIG_SSL_CLIENT=y # CONFIG_FEATURE_TELNETD_INETD_WAIT is not set # CONFIG_TFTP is not set # CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set # CONFIG_TFTPD is not set # CONFIG_FEATURE_TFTP_GET is not set # CONFIG_FEATURE_TFTP_PUT is not set diff --git a/include/mingw.h b/include/mingw.h index 15ead7799..568b1d846 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -354,7 +354,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result); struct tm *localtime_r(const time_t *timep, struct tm *result); char *strptime(const char *s, const char *format, struct tm *tm); size_t mingw_strftime(char *buf, size_t max, const char *format, const struct tm *tm); -int stime(time_t *t); +int clock_settime(clockid_t clk_id, const struct timespec *tp); #define strftime mingw_strftime diff --git a/win32/mingw.c b/win32/mingw.c index 7e4d6a318..38fbf2d4b 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -1392,7 +1392,7 @@ size_t mingw_strftime(char *buf, size_t max, const char *format, const struct tm return ret; } -int stime(time_t *t UNUSED_PARAM) +int clock_settime(clockid_t clk_id UNUSED_PARAM, const struct timespec *tp UNUSED_PARAM) { errno = EPERM; return -1; -- cgit v1.2.3-55-g6feb