[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)
Previously, the macro would be redefined when the header was included.
(cherry picked from commit
65f3432ac32f92bc3d8b7b11103a56c5a70049c0)
Co-authored-by: Collin Funk <collin.funk1@gmail.com>
--- /dev/null
+Don't redefine ``EX_OK`` when the system has the ``sysexits.h`` header.
# include "winreparse.h"
#endif
-#if !defined(EX_OK) && defined(EXIT_SUCCESS)
-# define EX_OK EXIT_SUCCESS
-#endif
-
/* On android API level 21, 'AT_EACCESS' is not declared although
* HAVE_FACCESSAT is defined. */
#ifdef __ANDROID__
# include <sysexits.h>
#endif
+#if !defined(EX_OK) && defined(EXIT_SUCCESS)
+# define EX_OK EXIT_SUCCESS
+#endif
+
#ifdef HAVE_SYS_LOADAVG_H
# include <sys/loadavg.h>
#endif