1.
mac
<machine/endian.h>
https://blog.csdn.net/cattleDrinkRedWine/article/details/108123534
2.
error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] close(tfd); ^ 1 error generated.
解决方案
在出错的这个文件中添加头文件包含:
#include <fcntl.h> // for open #include <unistd.h> // for close
http://www.voidcn.com/article/p-njuycxod-bpc.html