Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak build on BSDs #65

Merged
merged 1 commit into from
Jul 9, 2022
Merged

Unbreak build on BSDs #65

merged 1 commit into from
Jul 9, 2022

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Jul 9, 2022

Regressed by f20ffb5. IPPROTO_TCP requires <netinet/in.h> while TCP_NODELAY requires <netinet/tcp.h>, both on Linux (glibc, musl) and on BSDs (DragonFly, FreeBSD, NetBSD, OpenBSD). Likely missed due to header bootlegging. To investigate on Linux (where it builds fine "as is") inject #error into <netinet/in.h> to let compiler show intermediate headers.

See also https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html

$ meson setup /tmp/neatvnc_build
$ meson compile -C /tmp/neatvnc_build
[...]
src/server.c:1119:17: error: use of undeclared identifier 'IPPROTO_TCP'
        setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
                       ^

src/server.c:1119:17: error: use of undeclared identifier 'IPPROTO_TCP'
        setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
                       ^
@any1 any1 merged commit 4baeaa4 into any1:master Jul 9, 2022
@any1
Copy link
Owner

any1 commented Jul 9, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants