From: Bruce Cran Date: Thu, 7 May 2015 20:56:58 +0000 (-0600) Subject: Fix compiler warning and test progs linker errors on Windows X-Git-Tag: fio-2.2.8~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=824d6ff466fed05679a7d0991fdf3ee1d625a3c8;p=fio.git Fix compiler warning and test progs linker errors on Windows Add prototype for ctime_r to os-windows.h to avoid compiler warning. Link in os/windows/posix.o and lib/hweight.o to allow test progs to build on Windows. Signed-off-by: Jens Axboe --- diff --git a/Makefile b/Makefile index 1b312cbd..d9aedf52 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,12 @@ T_OBJS += $(T_LFSR_TEST_OBJS) T_OBJS += $(T_BTRACE_FIO_OBJS) T_OBJS += $(T_DEDUPE_OBJS) +ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS))) + T_DEDUPE_OBJS += os/windows/posix.o lib/hweight.o + T_SMALLOC_OBJS += os/windows/posix.o lib/hweight.o + T_LFSR_TEST_OBJS += os/windows/posix.o lib/hweight.o +endif + T_TEST_PROGS = $(T_SMALLOC_PROGS) T_TEST_PROGS += $(T_IEEE_PROGS) T_PROGS += $(T_ZIPF_PROGS) diff --git a/os/os-windows.h b/os/os-windows.h index 66036351..9e931c9c 100644 --- a/os/os-windows.h +++ b/os/os-windows.h @@ -105,6 +105,7 @@ int fcntl(int fildes, int cmd, ...); int fdatasync(int fildes); int lstat(const char * path, struct stat * buf); uid_t geteuid(void); +char* ctime_r(const time_t *t, char *buf); int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); ssize_t pwrite(int fildes, const void *buf, size_t nbyte,