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

Build broken for 32-bit OpenSSL 3.3.0 on AIX 7.1 #24236

Open
Eason-Yu opened this issue Apr 22, 2024 · 1 comment
Open

Build broken for 32-bit OpenSSL 3.3.0 on AIX 7.1 #24236

Eason-Yu opened this issue Apr 22, 2024 · 1 comment
Labels
help wanted triaged: bug The issue/pr is/fixes a bug

Comments

@Eason-Yu
Copy link

Eason-Yu commented Apr 22, 2024

Got the following build error while trying to build 32-bit OpenSSL 3.3.0 on AIX 7.1:

ssl/rio/poll_immediate.c: In function 'SSL_poll':
ssl/rio/poll_immediate.c:62:9: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:72:23: error: 'SSL_POLL_ITEM' has no member named 'reqevents'
ssl/rio/poll_immediate.c:88:21: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:88:21: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:100:17: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:100:17: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:107:13: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:107:13: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:112:13: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:112:13: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'
ssl/rio/poll_immediate.c:115:13: error: 'SSL_POLL_ITEM' has no member named 'rtnevents'

The root cause is ‘events’ and ‘revents’ are defined as macro for 32 bit in /usr/include/sys/poll.h, so in ssl/rio/poll_immediate.c, any reference of ‘events’ and ‘revents’ are replaced by ‘reqevents’ and ‘rtnevents’ respectively, which is unexpected.

Ref: Snippet of usr/include/sys/poll.h

…
#ifdef  __64BIT__
/* pollfd.fd is always a 32 bit entity (XOPEN) */
struct  pollfd
{
        int     fd;                     /* file descriptor or file ptr  */
        short   events;                 /* requested events             */
        short   revents;                /* returned events              */

};
#else /* __64BIT__ */
struct  pollfd
{
        long    fd;                     /* file descriptor or file ptr  */
        ushort  reqevents;              /* requested events             */
        ushort  rtnevents;              /* returned events              */
};
#define events  reqevents               /* SVR3,4 pollfd member name    */
#define revents rtnevents               /* SVR3,4 pollfd member name    */
#endif /* __64BIT__ */
…

@Eason-Yu Eason-Yu added the issue: bug report The issue was opened to report a bug label Apr 22, 2024
@nhorman
Copy link
Contributor

nhorman commented Apr 23, 2024

That seems....rather unkind for AIX to globally define such a generic name like this. They've basically restricted any using code from using the term events/revents here.

It should be fairly easy to fix, but IBM shouldn't do that.

@nhorman nhorman added triaged: bug The issue/pr is/fixes a bug help wanted labels Apr 23, 2024
@t8m t8m removed the issue: bug report The issue was opened to report a bug label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants