]> granicus.if.org Git - curl/commit
nss: fix MinGW compiler warnings
authorMarcel Raad <raad@teamviewer.com>
Thu, 6 Apr 2017 17:52:39 +0000 (19:52 +0200)
committerMarcel Raad <raad@teamviewer.com>
Tue, 18 Apr 2017 14:38:04 +0000 (16:38 +0200)
commita4ff8a1a0e1af742ac0a0f0eac45d9257678edd0
treec5934e1e071581a440d3414df8407126e0060f31
parent33cfcfd9f0378625d3bddbd2c8ac5aad4b646f26
nss: fix MinGW compiler warnings

This fixes 3 warnings issued by MinGW:
1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of
PRInt32, which is 64 bits on Windows. Fixed this by including the
corresponding header file instead of redeclaring the function, which is
supported even though it is in the private include folder. [1]
2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an explicit
narrowing cast is needed.
3. Curl_timeleft returns time_t instead of long since commit
21aa32d30dbf319f2d336e0cb68d3a3235869fbb.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket

Closes https://github.com/curl/curl/pull/1393
lib/vtls/nss.c