Implicit declaration of function 'ether_ntoa' is invalid in C99
报错代码:
strcpy(temp, (char *)ether_ntoa(LLADDR(sdl))); 解决方法: 导入这三个头文件即可,
#include <sys/types.h>
#include <sys/socket.h>
#include <net/ethernet.h> 然后上面那行代码会有一个警告:"Incompatible pointer types passing 'caddr_t' (aka 'char *') to parameter of type 'const struct ether_addr *'" ;
可以在LLADDR的前面加上(const struct ether_addr *) 也就是这样:
strcpy(temp, (char *)ether_ntoa((const struct ether_addr *)LLADDR(sdl)));
这样就没有警告了。
Implicit declaration of function 'ether_ntoa' is invalid in C99的更多相关文章
- Implicit declaration of function 'CC_MD5' is invalid in C99
//导入这个就行了#import <CommonCrypto/CommonDigest.h> //没有导包的时候,提示如下: Implicit declaration of functio ...
- warning: control reaches end of non-void function 和 warning: implicit declaration of function 'rsgClearColor' is invalid in C99
用gcc编译一个程序的时候出现这样的警告: warning: control reaches end of non-void function 它的意思是:控制到达非void函数的结尾.就是说你的一些 ...
- 关于"implicit declaration of function 'gettimeofday' is invalid in c99"的解决
http://blog.csdn.net/macmini/article/details/10503799 当我们使用 gettimeofday(&time, NULL);时,会出现这样一个W ...
- implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in c99
问题:implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in c99 解决办法: 在出现该问题的函数前后加上 ...
- Implicit declaration of function 'BMKCoordinateForMapPoint' is invalid in C99
少一个头文件 #import <BaiduMapAPI_Utils/BMKGeometry.h> 加上这个就好了 <HPHalfScreenTopBar: 0x103570bb0; ...
- Xcode解决“Implicit declaration of function 'XXX' is invalid in C99” 警告或报错
1.Build Setting>>>C Language Dialect,然后选择GNU99[-std=gnu99] (选择看项目实际要求). 2.Build Setting> ...
- xCode中去除“Implicit declaration of function 'sysctl' is invalid in C99” 警告
http://blog.csdn.net/dreambegin/article/details/8609121 一般出现该问题是因为通过C调用了unix/linux 底层接口,所以需要调整c语言的编译 ...
- linux系统下,警告:warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 和 warning: the `gets' function is dangerous and should not be used. 的由来和解决方法。
字符数组 的英文名字是 char [] gets()函数的基本用法为:char *gets(char *s); 该函数的参数是一个字符数组,该函数的返回值也是一个字符数组. linux下的代码如下: ...
- implicit declaration of function 'copy_from_user'
内核中使用copy_from_user()和copy_to_user()函数,编译出现错误: implicit declaration of function 'copy_from_user' 需要添 ...
随机推荐
- STL之map&multimap使用简介
map 1.insert 第一种:用insert函数插入pair数据 #include <map> #include <string> #include <iostrea ...
- linux备忘录-文件系统管理
Extx 文件系统原理 block group 每个分区(partition)的组成为 boot sector -> block group -> block group -> bl ...
- ocrosoft Contest1316 - 信奥编程之路~~~~~第三关 问题 K: 大整数加法
http://acm.ocrosoft.com/problem.php?cid=1316&pid=10 题目描述 求两个不超过200位的非负整数的和. 输入 有两行,每行是一个不超过200 ...
- BI商业智能培训系列——(一)概述
简介: Business Intelligence,简称 BI. 商业智能,是指用现代的技术进行数据分析,以实现商业价值,这些技术包括数据仓库技术,线上分析处理技术,数据挖掘,数据展现技术等. 以往的 ...
- 第十一篇:MySQL基础
本篇内容 MySQL概述 MySQL安装 MySQL库增.删.改.查 MySQL表增.删.改.查 MySQL表记录增.删.改.查 一. MySQL概述 MySQL是一个关系型数据库管理系统,由瑞典 M ...
- [ARC068F] Solitaire [DP]
题面 传送门 思路 单调性 首先,显然可以发现这些数在放进双端队列之后肯定是一个$V$形的排布:1在最中间,两边的数都是单调递增 那么我们拿出来的数,显然也可以划分成2个单调递减的子序列(因为我们也是 ...
- 通过OpenGL ES在iOS平台实践增强现实
http://www.cnblogs.com/elvisyzhao/p/3398250.html 本文采用OpenGL ES 1固定渲染管线实现,目标为在设备拍摄到的现实世界中,绘制世界坐标轴,并根据 ...
- android 研究的环境搭建、高效工具、网站资源
================= 2015 年 10 月 14 号 更新 著名的android开源社区xda有一个帖子,详细描述了android开发和研究环境的初始搭建过程: http://for ...
- Linux内核情景分析的alloc_pages
NUMA结构的alloc_pages ==================== mm/numa.c 43 43 ==================== 43 #ifdef CONFIG_DISCON ...
- JS或jsp获取Session中保存的值
JS是不能读取Session中的值的 . session是服务器对象, javascript是客户端脚本,你能做的操作就是把这个值用 <%=%>输出到页面的javascript中参与运算, ...