Skip to content

aix: disable sendmmsg/recvmmsg#30832

Closed
abmusse wants to merge 1 commit intoopenssl:masterfrom
abmusse:aix-sendmmsg-recvmmsg
Closed

aix: disable sendmmsg/recvmmsg#30832
abmusse wants to merge 1 commit intoopenssl:masterfrom
abmusse:aix-sendmmsg-recvmmsg

Conversation

@abmusse
Copy link
Copy Markdown
Contributor

@abmusse abmusse commented Apr 15, 2026

AIX header files don't properly expose sendmmsg/recvmmsg function declarations. Disable these functions to avoid implicit declaration errors with clang 16+.

This issue was discovered when building Node.js with clang ref: nodejs/node#62656

CLA: trivial
Fixes: #30806

AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang
ref: nodejs/node#62656

Fixes: openssl#30806
@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Apr 15, 2026
@mattcaswell
Copy link
Copy Markdown
Member

I'd like @makr73's opinion on this. Not too long ago #29334 added support for AIX, and this is now taking it away again.

@makr73
Copy link
Copy Markdown
Contributor

makr73 commented Apr 17, 2026

Hm ... I don't make any stunts to get this compiled on an AIX 7.2. I use, however, XLC 16.1 for AIX. Maybe the GCC or clang do some things differently, here. I don't have them available. I also don't have xlclang, which would be another test worth trying. If xlclang is also working without stunts I'd say: make it compiler dependent. Do we know someone who has such an environment available?

@abmusse
Copy link
Copy Markdown
Contributor Author

abmusse commented Apr 17, 2026

I've installed xlclang onto one of my development AIX 7.2 machines and ran this simple test:

#include  <sys/types.h>
#include  <sys/socketvar.h>
#include  <sys/socket.h>
#include  <net/proto_uipc.h>

int main() {
    struct mmsghdr msgs[1];
    
    /* This causes implicit declaration warning - no header declares sendmmsg */
    sendmmsg(0, msgs, 1, 0);
    
    return 0;
}
$ /opt/IBM/xlC/16.1.0/bin/xlclang -o sendmmsg-test.out sendmmsg-test.c
sendmmsg-test.c:10:5: warning: implicit declaration of function 'sendmmsg' is invalid in C99
      [-Wimplicit-function-declaration]
    sendmmsg(0, msgs, 1, 0);
    ^
1 warning generated.

Using xlc everything works without the warning:

$ /opt/IBM/xlC/16.1.0/bin/xlclang --version                           
IBM XL C/C++ for AIX, V16.1.0  (5725-C72, 5765-J12)
Version: 16.01.0000.0021

$ /opt/IBM/xlC/16.1.0/bin/xlc -o sendmmsg-test.out sendmmsg-test.c 
-bash-5.3$ echo $?
0

So it seems like this only works properly with xlc for some reason!

UPDATE

Actually if you enable C99 you will see that the imiplict function declaration is occuring!

$ /opt/IBM/xlC/16.1.0/bin/xlc -qlanglvl=stdc99 -o sendmmsg-test.out sendmmsg-test.c
"sendmmsg-test.c", line 10.5: 1506-1421 (W) Implicit function declaration for function "sendmmsg".

xlc just defaults to an older std than xlclang/clang. It still does the implicit function declaration under the covers!


Perhaps we should only allow enabling sendmmsg / recvmmsg when xlc is used?
Is there an xlc only define we can check?

With that update above looks like all compliers have the implict function declaration going on

@makr73

@makr73
Copy link
Copy Markdown
Contributor

makr73 commented Apr 20, 2026

Interesting. The doc says that xlc supports all of the ISO C99 standard plus most IBM extensions. Implicitly it is also documented that xlc supports implicit function declaration. If invoked with std99 it will set a macro __C99_REQUIRE_FUNC_DECL to indicate "that implicit function declaration is not supported."
@mattcaswell , I wasn't aware that the compiler is doing the stunts for me. Given the latest findings I support the move to disable sendmmsg/recvmmsg again. Just take care that it doesn't break the test suite again.
@abmusse, thank you for doing the deep dive!

@abmusse
Copy link
Copy Markdown
Contributor Author

abmusse commented Apr 21, 2026

@mattcaswell Please let me know if you need to me to do anything else to help get this moving forward.

@mattcaswell mattcaswell added branch: master Applies to master branch branch: 3.3 Applies to openssl-3.3 (EOL) branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 triaged: bug The issue/pr is/fixes a bug tests: exempted The PR is exempt from requirements for testing approval: review pending This pull request needs review by a committer labels Apr 22, 2026
Copy link
Copy Markdown
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

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

I think this can be accepted as a CLA trivial change.

@abmusse - please could you add "CLA: trivial" in a line on its own to the commit description (assuming you agree that it is trivial from a copyright perspective).

Alternatively please submit a CLA:
https://openssl-library.org/policies/cla/

@openssl-machine openssl-machine added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Apr 22, 2026
@mattcaswell
Copy link
Copy Markdown
Member

@esyr - do you agree this is trivial?

@esyr
Copy link
Copy Markdown
Member

esyr commented Apr 22, 2026

Yes, agree with CLA: trivial.

@abmusse
Copy link
Copy Markdown
Contributor Author

abmusse commented Apr 22, 2026

I think this can be accepted as a CLA trivial change.

@abmusse - please could you add "CLA: trivial" in a line on its own to the commit description (assuming you agree that it is trivial from a copyright perspective).

Alternatively please submit a CLA: https://openssl-library.org/policies/cla/

Yes I agree this is a trival change!

Done added the following to the original comment

CLA: trivial

@mattcaswell mattcaswell added cla: trivial One of the commits is marked as 'CLA: trivial' and removed hold: cla required The contributor needs to submit a license agreement labels Apr 23, 2026
@mattcaswell mattcaswell reopened this Apr 23, 2026
@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Apr 23, 2026
@mattcaswell
Copy link
Copy Markdown
Member

Done added the following to the original comment

The bot is insisting on putting "hold: cla required". The reason is that you just edited the original comment rather than changing the actual commit message.

Please either update the actual commit message or, alternatively, whoever commits this can fix it during merge if you're not sure how to do that.

@openssl-machine
Copy link
Copy Markdown
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@mattcaswell mattcaswell added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Apr 23, 2026
@abmusse
Copy link
Copy Markdown
Contributor Author

abmusse commented Apr 24, 2026

Done added the following to the original comment

The bot is insisting on putting "hold: cla required". The reason is that you just edited the original comment rather than changing the actual commit message.

Please either update the actual commit message or, alternatively, whoever commits this can fix it during merge if you're not sure how to do that.

Can I force push the amended commit to include CLA: trivial line?

@esyr
Copy link
Copy Markdown
Member

esyr commented Apr 24, 2026

Can I force push the amended commit to include CLA: trivial line?

I guess so, github doesn't reset reviews on pushes that involve only commit message changes (as if it treats them as insignificant or something…).

@esyr esyr removed the branch: 3.3 Applies to openssl-3.3 (EOL) label Apr 26, 2026
@esyr
Copy link
Copy Markdown
Member

esyr commented Apr 26, 2026

Dropped branch: 3.3 label, as openssl-3.3 is EOL.

@esyr esyr removed the hold: cla required The contributor needs to submit a license agreement label Apr 26, 2026
openssl-machine pushed a commit that referenced this pull request Apr 26, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: #30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from #30832)
openssl-machine pushed a commit that referenced this pull request Apr 26, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: #30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from #30832)

(cherry picked from commit 646aae6)
openssl-machine pushed a commit that referenced this pull request Apr 26, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: #30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from #30832)

(cherry picked from commit 646aae6)
openssl-machine pushed a commit that referenced this pull request Apr 26, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: #30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from #30832)

(cherry picked from commit 646aae6)
@esyr
Copy link
Copy Markdown
Member

esyr commented Apr 26, 2026

Pushed to master, openssl-4.0, openssl-3.6, openssl-3.5, and openssl-3.4. Thank you.

@esyr esyr closed this Apr 26, 2026
openssl-machine pushed a commit that referenced this pull request Apr 26, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: #30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from #30832)

(cherry picked from commit 646aae6)
Sashan pushed a commit to Sashan/openssl that referenced this pull request Apr 28, 2026
AIX header files don't properly expose sendmmsg/recvmmsg function
declarations. Disable these functions to avoid implicit declaration
errors with clang 16+.

This issue was discovered when building Node.js with clang.

CLA: trivial
Fixes: 52cd2a4 "Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR."
References: nodejs/node#62656
Resolves: openssl#30806

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
MergeDate: Sun Apr 26 12:02:58 2026
(Merged from openssl#30832)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 cla: trivial One of the commits is marked as 'CLA: trivial' tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIX: sendmmsg and recvmmsg get implicit declartion

5 participants