Skip to content

Define MSG_DONTWAIT as MSG_NONBLOCK if needed and possible - #2477

Closed
reshmavk wants to merge 5 commits into
squid-cache:masterfrom
reshmavk:missing_msg_dontwait
Closed

Define MSG_DONTWAIT as MSG_NONBLOCK if needed and possible#2477
reshmavk wants to merge 5 commits into
squid-cache:masterfrom
reshmavk:missing_msg_dontwait

Conversation

@reshmavk

@reshmavk reshmavk commented Aug 19, 2026

Copy link
Copy Markdown
Contributor
fd.cc:138:56: error: 'MSG_DONTWAIT' was not declared in this scope;
did you mean 'MSG_DONTROUTE'?

AIX does not define MSG_DONTWAIT. The functional equivalent of this
flag on AIX is MSG_NONBLOCK.

This change fixes src/fd.cc compilation on AIX, but more changes are
required to fix AIX build.

@squid-anubis squid-anubis added the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Aug 19, 2026
@squid-anubis

This comment was marked as resolved.

@squid-anubis

This comment was marked as resolved.

@squid-anubis squid-anubis removed the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Aug 19, 2026
@rousskov rousskov changed the title Define MSG_DONTWAIT as MSG_NONBLOCK for AIX Define MSG_DONTWAIT as MSG_NONBLOCK if needed and possible Aug 19, 2026

@rousskov rousskov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix! I made it a bit more general and updated its location to where current master/v8 code places these kind of hacks. I did not test my changes. Please check!

I adjusted PR description, primarily to avoid retelling what the diff already clearly says. Please adjust further as needed.

I have two followup questions, but this PR is on the right track.

Comment thread compat/socket.h
Comment thread compat/socket.h
Comment thread CONTRIBUTORS
@rousskov rousskov added the S-waiting-for-author author action is expected (and usually required) label Aug 19, 2026

@rousskov rousskov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is usually best to introduce Squid-specific constants than to define/fix "standard" ones, but Squid already violates that rule of thumb for MSG_NOSIGNAL, so I think we can go with the proposed solution, especially since it fixes AIX build.

Comment thread compat/socket.h
@rousskov rousskov added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required) and removed S-waiting-for-author author action is expected (and usually required) labels Aug 20, 2026
squid-anubis pushed a commit that referenced this pull request Aug 24, 2026
    fd.cc:138:56: error: 'MSG_DONTWAIT' was not declared in this scope;
    did you mean 'MSG_DONTROUTE'?

AIX does not define `MSG_DONTWAIT`. The functional equivalent of this
flag on AIX is `MSG_NONBLOCK`.

This change fixes `src/fd.cc` compilation on AIX, but more changes are
required to fix AIX build.
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Aug 24, 2026
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Aug 24, 2026
@kinkie kinkie added the backport-to-v7 maintainer has approved these changes for v7 backporting label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v7 maintainer has approved these changes for v7 backporting M-merged https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants