소스 검색

Define relevant macros when LACKS_ERRNO_H is true

(cherry picked from commit 3195980b497edc3d9e78a572b48ec5cc5db45955)
Thaddeus Crews 1 개월 전
부모
커밋
106af5b46a
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/stdlib/SDL_malloc.c

+ 7 - 0
src/stdlib/SDL_malloc.c

@@ -1478,6 +1478,13 @@ DLMALLOC_EXPORT int mspace_mallopt(int, int);
 #endif /* NO_MALLOC_STATS */
 #ifndef LACKS_ERRNO_H
 #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 */
 #ifdef DEBUG
 #if ABORT_ON_ASSERT_FAILURE