Skip to content

build: assume sys/socket.h, sys/time.h on non-Windows (as in curl/curl.h)#17522

Closed
vszakats wants to merge 6 commits intocurl:masterfrom
vszakats:perm-sys-h
Closed

build: assume sys/socket.h, sys/time.h on non-Windows (as in curl/curl.h)#17522
vszakats wants to merge 6 commits intocurl:masterfrom
vszakats:perm-sys-h

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jun 2, 2025

Public curl/curl.h includes these headers for non-Windows platforms
without further conditions. This makes it safe to assume these headers
do exist, allowing to save two feature checks for non-Windows targets.

sys/time.h is also assumed on Windows with mingw-w64, for declaring
gettimeofday().


  • drop HAVE_SYS_SOCKET_H and HAVE_SYS_TIME_H from C code?

@vszakats vszakats marked this pull request as draft June 2, 2025 15:22
@testclutch

This comment was marked as outdated.

@vszakats vszakats marked this pull request as ready for review June 11, 2025 04:36
@vszakats vszakats closed this in 56d5982 Jun 11, 2025
@vszakats vszakats deleted the perm-sys-h branch June 11, 2025 05:08
vszakats added a commit that referenced this pull request Jun 15, 2025
Both are available with well-known conditions, under non-Windows, and
`curl/curl.h` already uses them. `sys/time.h` is also necessary for
mingw-w64 for `gettimeofday()`.

Follow-up to 56d5982 #17522

Closes #17581
denandz pushed a commit to denandz/curl that referenced this pull request Jun 21, 2025
…l/curl.h`)

Public `curl/curl.h` includes these headers for non-Windows platforms
without further conditions. This makes it safe to assume these headers
do exist, allowing to save two feature checks for non-Windows targets.

`sys/time.h` is also assumed on Windows with mingw-w64, for declaring
`gettimeofday()`.

Closes curl#17522
denandz pushed a commit to denandz/curl that referenced this pull request Jun 21, 2025
Both are available with well-known conditions, under non-Windows, and
`curl/curl.h` already uses them. `sys/time.h` is also necessary for
mingw-w64 for `gettimeofday()`.

Follow-up to 56d5982 curl#17522

Closes curl#17581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants