bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Wget 1.17 doesn't compile on Windows (hsts.c)


From: Darshit Shah
Subject: Re: [Bug-wget] Wget 1.17 doesn't compile on Windows (hsts.c)
Date: Tue, 17 Nov 2015 00:40:51 +0100
User-agent: Mutt/1.5.24+27 (c799162691b2) (2015-08-30)

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

Attachment: 0001-Use-gnulib-module-flock-to-provide-function.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]