Linux服务器客户端编写过程中报错”implicit declaration of function ‘inet_pton’ “

1. 问题

Linux服务器客户端编写过程中报错:
image

2. 问题分析

gcc的c扩展与c标准有冲突

2. 解决方案

添加头文件#include <arpa/inet.h>

posted @ 2022-05-02 15:47  云梦士  阅读(307)  评论(0编辑  收藏  举报