Skip to content

Commit 3195980

Browse files
Repiteoslouken
authored andcommitted
Define relevant macros when LACKS_ERRNO_H is true
1 parent 10458f2 commit 3195980

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/stdlib/SDL_malloc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,13 @@ DLMALLOC_EXPORT int mspace_mallopt(int, int);
14781478
#endif /* NO_MALLOC_STATS */
14791479
#ifndef LACKS_ERRNO_H
14801480
#include <errno.h> /* for MALLOC_FAILURE_ACTION */
1481+
#else /* LACKS_ERRNO_H */
1482+
#ifndef EINVAL
1483+
#define EINVAL 22
1484+
#endif
1485+
#ifndef ENOMEM
1486+
#define ENOMEM 12
1487+
#endif
14811488
#endif /* LACKS_ERRNO_H */
14821489
#ifdef DEBUG
14831490
#if ABORT_ON_ASSERT_FAILURE

0 commit comments

Comments
 (0)