Define relevant macros when LACKS_ERRNO_H is true

(cherry picked from commit 3195980b49)
This commit is contained in:
Thaddeus Crews
2025-07-30 10:34:01 -05:00
committed by Sam Lantinga
parent 522716ed90
commit 106af5b46a

View File

@@ -1478,6 +1478,13 @@ DLMALLOC_EXPORT int mspace_mallopt(int, int);
#endif /* NO_MALLOC_STATS */ #endif /* NO_MALLOC_STATS */
#ifndef LACKS_ERRNO_H #ifndef LACKS_ERRNO_H
#include <errno.h> /* for MALLOC_FAILURE_ACTION */ #include <errno.h> /* for MALLOC_FAILURE_ACTION */
#else /* LACKS_ERRNO_H */
#ifndef EINVAL
#define EINVAL 22
#endif
#ifndef ENOMEM
#define ENOMEM 12
#endif
#endif /* LACKS_ERRNO_H */ #endif /* LACKS_ERRNO_H */
#ifdef DEBUG #ifdef DEBUG
#if ABORT_ON_ASSERT_FAILURE #if ABORT_ON_ASSERT_FAILURE