This patch causes build failures on our Ubuntu Precise builders. I don't have a machine to test it directly, but somehow unistd.h is still included indirectly:
In file included from http.c:37:0: ../../include/ws2tcpip.h:57:13: error: conflicting types for 'socklen_t' /usr/include/unistd.h:275:21: note: previous declaration of 'socklen_t' was here
Full build log: https://launchpadlibrarian.net/197555168/buildlog_ubuntu-precise-i386.wine-s...
On 13.02.2015 12:12, Jacek Caban wrote:
dlls/wininet/Makefile.in | 4 +- dlls/wininet/cookie.c | 10 +-- dlls/wininet/dialogs.c | 7 +- dlls/wininet/ftp.c | 61 ++++---------- dlls/wininet/http.c | 22 ++--- dlls/wininet/internet.c | 18 +--- dlls/wininet/internet.h | 23 ------ dlls/wininet/netconnection.c | 193 ++++--------------------------------------- dlls/wininet/urlcache.c | 11 +-- dlls/wininet/utility.c | 60 ++------------ 10 files changed, 49 insertions(+), 360 deletions(-)
On 13/02/15 20:00, Sebastian Lackner wrote:
This patch causes build failures on our Ubuntu Precise builders. I don't have a machine to test it directly, but somehow unistd.h is still included indirectly:
In file included from http.c:37:0: ../../include/ws2tcpip.h:57:13: error: conflicting types for 'socklen_t' /usr/include/unistd.h:275:21: note: previous declaration of 'socklen_t' was here
Full build log: https://launchpadlibrarian.net/197555168/buildlog_ubuntu-precise-i386.wine-s...
It looks like zlib.h is including unistd.h. Could you, or anyone else seeing this error, send me zlib.h and zconf.h so I may take a look.
Thanks, Jacek
On 14.02.2015 14:22, Jacek Caban wrote:
On 13/02/15 20:00, Sebastian Lackner wrote:
This patch causes build failures on our Ubuntu Precise builders. I don't have a machine to test it directly, but somehow unistd.h is still included indirectly:
In file included from http.c:37:0: ../../include/ws2tcpip.h:57:13: error: conflicting types for 'socklen_t' /usr/include/unistd.h:275:21: note: previous declaration of 'socklen_t' was here
Full build log: https://launchpadlibrarian.net/197555168/buildlog_ubuntu-precise-i386.wine-s...
It looks like zlib.h is including unistd.h. Could you, or anyone else seeing this error, send me zlib.h and zconf.h so I may take a look.
Thanks, Jacek
Good guess, that it at least one of the ways how it still gets included. I've grabbed the corresponding files from the Ubuntu precise package: http://packages.ubuntu.com/precise/zlib1g-dev
zlib.h includes zconf.h, which includes zlibdefs.h. And this one contains a reference to unistd.h. Attaching all three header files for reference.
Regards, Sebastian
On 02/14/15 14:31, Sebastian Lackner wrote:
On 14.02.2015 14:22, Jacek Caban wrote:
On 13/02/15 20:00, Sebastian Lackner wrote:
This patch causes build failures on our Ubuntu Precise builders. I don't have a machine to test it directly, but somehow unistd.h is still included indirectly:
In file included from http.c:37:0: ../../include/ws2tcpip.h:57:13: error: conflicting types for 'socklen_t' /usr/include/unistd.h:275:21: note: previous declaration of 'socklen_t' was here
Full build log: https://launchpadlibrarian.net/197555168/buildlog_ubuntu-precise-i386.wine-s...
It looks like zlib.h is including unistd.h. Could you, or anyone else seeing this error, send me zlib.h and zconf.h so I may take a look.
Thanks, Jacek
Good guess, that it at least one of the ways how it still gets included. I've grabbed the corresponding files from the Ubuntu precise package: http://packages.ubuntu.com/precise/zlib1g-dev
zlib.h includes zconf.h, which includes zlibdefs.h. And this one contains a reference to unistd.h. Attaching all three header files for reference.
Thanks, I just sent patches that should fix these build failures. They apply on top of my yesterday wininet patches.
Cheers, Jacek
On Sat, 14 Feb 2015, Jacek Caban wrote: [...]
Thanks, I just sent patches that should fix these build failures. They apply on top of my yesterday wininet patches.
The patch does fix the build. It should however also remove the use of Z_SOLO since it's not needed anymore.
I came up with a different solution: move the zlib code to its own C file to isolate it from the rest, and particularly from anything related to winsock. I'm attaching the patch in case there's interest.
The inet_ntoa() part may still make sense.
Hi Francois,
On 02/15/15 12:50, Francois Gouget wrote:
On Sat, 14 Feb 2015, Jacek Caban wrote: [...]
Thanks, I just sent patches that should fix these build failures. They apply on top of my yesterday wininet patches.
The patch does fix the build. It should however also remove the use of Z_SOLO since it's not needed anymore.
Yes, good catch, thanks. I meant to remove that. It should also fix builds on FreeBSD. I will resend the whole series.
I came up with a different solution: move the zlib code to its own C file to isolate it from the rest, and particularly from anything related to winsock. I'm attaching the patch in case there's interest.
I thought about that too, but it seemed to me like more invasive than it has to be. How about we take my patches and if we find that it's still problematic, we take your patch?
The inet_ntoa() part may still make sense.
Yes, it's worth taking regardless solution we choose.
Thanks, Jacek
On Mon, 16 Feb 2015, Jacek Caban wrote: [...]
I came up with a different solution: move the zlib code to its own C file to isolate it from the rest, and particularly from anything related to winsock. I'm attaching the patch in case there's interest.
I thought about that too, but it seemed to me like more invasive than it has to be. How about we take my patches and if we find that it's still problematic, we take your patch?
Sure. That works for me.