I think it's because flock isn't implemented in Windows. The ideal solution would be to use some WIN32 API to get it done. However, I saw that gnulib actually provides an implementation of flock that can be used on Windows.
Hence, maybe just using the gnulib module may work.

@Giuseppe, @Tim: What do you'll think?

I've attached a patch that **may** fix the issue. Could you please try to compile Wget from git after applying this patch? If that is not possible, please contact me directly and I can provide you with a release tarball with this patch applied and hope that it works.
On 11/16, Jernej Simončič wrote:
Looks like hsts.c tries to use flock with a parameter that doesn't
work on Windows:

x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H 
-DSYSTEM_WGETRC=\"/win32dev/misc/wget/out64/etc/wgetrc\" 
-DLOCALEDIR=\"/win32dev/misc/wget/out64/share/locale\" -I.  -I../lib -I../lib 
-I/win32dev/misc/wget/out64/include  -I/win32dev/misc/wget/out64/include  -DHAVE_LIBSSL  -DNDEBUG  
-MT hsts.o -MD -MP -MF .deps/hsts.Tpo -c -o hsts.o hsts.c
hsts.c: In function 'hsts_store_dump':
hsts.c:329:20: warning: format '%lu' expects argument of type 'long unsigned 
int', but argument 6 has type 'time_t' [-Wformat=]
                   khi->created, khi->max_age) < 0)
                   ^
hsts.c:329:20: warning: format '%lu' expects argument of type 'long unsigned 
int', but argument 7 has type 'time_t' [-Wformat=]
hsts.c: In function 'hsts_store_save':
hsts.c:505:22: error: 'LOCK_EX' undeclared (first use in this function)
          flock (fd, LOCK_EX);
                     ^
hsts.c:505:22: note: each undeclared identifier is reported only once for each 
function it appears in


--
< Jernej Simončič ><><><><><><><><><><><>< http://eternallybored.org/ >

          Because 10 billion years' time is so fragile, so ephemeral...
it arouses such a bittersweet, almost heartbreaking fondness.



--
Thanking You,
Darshit Shah
From 08ece891b5aab8ebd66aed29d7a4dd20a5fd7f82 Mon Sep 17 00:00:00 2001
From: Darshit Shah <[email protected]>
Date: Tue, 17 Nov 2015 00:36:06 +0100
Subject: [PATCH] Use gnulib module flock to provide function

* bootstrap.conf: Use module flock from gnulib to provide it on other platforms
such as Windows.
---
 bootstrap.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bootstrap.conf b/bootstrap.conf
index ce52d99..9da6d7a 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -38,6 +38,7 @@ close
 connect
 dirname
 fcntl
+flock
 fnmatch
 futimens
 ftello
-- 
2.6.2

Attachment: signature.asc
Description: PGP signature

Reply via email to