Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 9 运行报错 #96

Closed
championship456 opened this issue Sep 13, 2017 · 8 comments
Closed

iOS 9 运行报错 #96

championship456 opened this issue Sep 13, 2017 · 8 comments

Comments

@championship456
Copy link

check_compile_time(sizeof(ICMPHeader) == 8);
check_compile_time(offsetof(ICMPHeader, type) == 0);
check_compile_time(offsetof(ICMPHeader, code) == 1);
check_compile_time(offsetof(ICMPHeader, checksum) == 2);
check_compile_time(offsetof(ICMPHeader, identifier) == 4);
check_compile_time(offsetof(ICMPHeader, sequenceNumber) == 6);

@summerHearts
Copy link

@championship456 一样

@summerHearts
Copy link

__Check_Compile_Time(sizeof(ICMPHeader) == 8);
__Check_Compile_Time(offsetof(ICMPHeader, type) == 0);
__Check_Compile_Time(offsetof(ICMPHeader, code) == 1);
__Check_Compile_Time(offsetof(ICMPHeader, checksum) == 2);
__Check_Compile_Time(offsetof(ICMPHeader, identifier) == 4);
__Check_Compile_Time(offsetof(ICMPHeader, sequenceNumber) == 6);

@summerHearts
Copy link

请这样做

@dustturtle
Copy link
Owner

是在真机运行报错吗?

@championship456
Copy link
Author

真机和模拟器运行都会报错,报错1 Expected parameter declarator 2 Expected ')' 红点提示是这个函数sizeof(ICMPHeader) == 8

@dustturtle
Copy link
Owner

最新版本的realreachability已经改成__Check_Compile_Time的方式了啊,请更新版本重试呢?

@championship456
Copy link
Author

真机和模拟器都已经没有问题了

@dustturtle
Copy link
Owner

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants