Skip to content

error: cannot find derive macro BitfieldStruct in this scope #5

Open
@ctaggart

Description

@ctaggart

The latest from master fails to compile with:

Camerons-MacBook-Pro:openconnect-rust cameron$ cargo build
   Compiling openconnect-rust v0.0.0 (/Users/cameron/github/openconnect-rust)
error: cannot find derive macro `BitfieldStruct` in this scope
    --> src/tun.rs:1198:29
     |
1198 |     #[derive ( Copy, Clone, BitfieldStruct )]
     |                             ^^^^^^^^^^^^^^

error: cannot find derive macro `BitfieldStruct` in this scope
    --> src/gpst.rs:1086:29
     |
1086 |     #[derive ( Copy, Clone, BitfieldStruct )]
     |                             ^^^^^^^^^^^^^^

It is complaining about:

openconnect-rust/src/tun.rs

Lines 1198 to 1215 in 28ff0a3

#[derive ( Copy, Clone, BitfieldStruct )]
#[repr(C)]
#[src_loc = "81:1"]
pub struct ip {
#[bitfield(name = "ip_hl", ty = "u_int", bits = "0..=3")]
#[bitfield(name = "ip_v", ty = "u_int", bits = "4..=7")]
pub ip_hl_ip_v: [u8; 1],
pub ip_tos: u_char,
pub ip_len: u_short,
pub ip_id: u_short,
pub ip_off: u_short,
pub ip_ttl: u_char,
pub ip_p: u_char,
pub ip_sum: u_short,
pub ip_src: in_addr,
pub ip_dst: in_addr,
/* source and dest address */
}

I tried to manually fix it for about a half hour and wasn't able to.

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