Skip to content

lib: drop unused linux/tcp.h, netinet/tcp.h includes - #23601

Closed
vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:drop-redundant-header
Closed

vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:drop-redundant-header

Conversation

@vszakats

@vszakats vszakats commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Also add comments saying why they are included.

Ref: 979b012 #2056

@vszakats
vszakats marked this pull request as draft October 26, 2026 00:56
@vszakats vszakats changed the title lib: drop unused linux/tcp.h includes lib: drop unused linux/tcp.h, netinet/tcp.h includes Oct 26, 2026
@vszakats
vszakats marked this pull request as ready for review October 26, 2026 01:26
@vszakats

Copy link
Copy Markdown
Member Author

What may be the reason to try a kernel header first, for the macro TCP_FASTOPEN_CONNECT?

(not a subject for this PR, just curious)

@vszakats vszakats closed this in 2ac9e4c Oct 26, 2026
@vszakats
vszakats deleted the drop-redundant-header branch October 26, 2026 10:15
vszakats added a commit that referenced this pull request Oct 27, 2026
Rely on POSIX `netinet/tcp.h` header for the `TCP_FASTOPEN_CONNECT`
macro (and for `TCP_NODELAY`).

`TCP_FASTOPEN_CONNECT` is defined by:
- glibc 2.26+ (2017-08-02)
- musl 1.1.19+ (2018-02-22)
- bionic (similar time frame)

This feature requires Linux kernel 4.11+ (2017-05-01), e.g. via
debian:buster, which also comes with compatible glibc and musl libs.

Follow-up to 2ac9e4c #23601
Follow-up to 979b012 #2056

Closes #23618
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.

1 participant