소스 검색

Speculative build fix for FreeBSD+GLIBC configuration

See
https://github.com/mamedev/mame/commit/a1f9b62dd0a491d6b26291837d43181c0e9e66fa
ocornut 9 년 전
부모
커밋
4961b2ea18
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      imgui_draw.cpp

+ 3 - 1
imgui_draw.cpp

@@ -18,9 +18,11 @@
 #include "imgui_internal.h"
 
 #include <stdio.h>      // vsnprintf, sscanf, printf
-#if !defined(alloca) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+#if !defined(alloca)
 #ifdef _WIN32
 #include <malloc.h>     // alloca
+#elif (defined(__FreeBSD__) || defined(FreeBSD_kernel) || defined(__DragonFly__)) && !defined(__GLIBC__)
+#include <stdlib.h>     // alloca. FreeBSD uses stdlib.h unless GLIBC
 #else
 #include <alloca.h>     // alloca
 #endif