]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a compilation failure in AIX
authorMatt Caswell <matt@openssl.org>
Fri, 28 Feb 2025 11:52:08 +0000 (11:52 +0000)
committerNeil Horman <nhorman@openssl.org>
Tue, 4 Mar 2025 14:22:58 +0000 (09:22 -0500)
AIX (at least for 7.1)  defines some macros for "events" and "revents" which
interferes with our own use of these names.

Fixes #24236

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26933)

(cherry picked from commit 5eb55ad8a70ef948432ba17e0985c7b4d3b13c25)

ssl/rio/poll_immediate.c

index 66e613a7dcdcd9ef52ed457d525c0335d5abe252..663e4fd91bd11f4c27f3c01521b2d7de269dbcd5 100644 (file)
 #include <openssl/err.h>
 #include "../ssl_local.h"
 
+#if defined(_AIX)
+/*
+ * Some versions of AIX define macros for events and revents for use when
+ * accessing pollfd structures (see Github issue #24236). That interferes
+ * with our use of these names here. We simply undef them.
+ */
+# undef revents
+# undef events
+#endif
+
 #define ITEM_N(items, stride, n) \
     (*(SSL_POLL_ITEM *)((char *)(items) + (n)*(stride)))