第1年10月23日 mac os endian.h file not found

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

posted @ 2021-10-23 18:55  lianhuaren  阅读(82)  评论(0编辑  收藏  举报