Skip to content

大神,运行报错啊 #14

Open
Open
@FrankChung1121

Description

@FrankChung1121

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);

这几行一直报错,是什么原因?

Activity

zhuweideng

zhuweideng commented on Jun 29, 2018

@zhuweideng

@FrankChung1121 修改 check_compile_time 替换为 __Check_Compile_Time

greezi

greezi commented on Sep 11, 2018

@greezi

@FrankChung1121
修改为:
__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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      大神,运行报错啊 · Issue #14 · coderMyy/CocoaAsyncSocket_Demo