gcc로 malloc이 들어 간 소스를 gcc로 컴파일 하면 아래와 같이 warning이 뜰 때가 있습니다
test.c:224: warning: implicit declaration of function ‘malloc’
test.c:224: warning: incompatible implicit declaration of built-in function ‘malloc’
이럴 때는 소스코드 내에 아래와 같이 헤더 파일 하나 추가시켜 주면 됩니다
#include <stdlib.h>
stdlib.h가 빠져서 이런 오류가 나올 수도 있는데, 추가하고도 warning이 나온 다면 다른 방법을 찾아 보셔야 할껍니다~