Switch to MSVC-style packing pragmas so it will compile on Windows.
gcc and clang accept this style as well.
This commit is contained in:
committed by
Bastian Bloessl
parent
28be829378
commit
7c154d97f7
@@ -40,6 +40,7 @@ namespace foo {
|
||||
gr_vector_void_star& output_items );
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct pcap_file_hdr {
|
||||
uint32_t magic_number; /* magic number */
|
||||
uint16_t version_major; /* major version number */
|
||||
@@ -48,15 +49,19 @@ namespace foo {
|
||||
uint32_t sigfigs; /* accuracy of timestamps */
|
||||
uint32_t snaplen; /* max length of captured packets, in octets */
|
||||
uint32_t network; /* data link type */
|
||||
}__attribute__((packed));
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct pcap_hdr {
|
||||
uint32_t ts_sec; /* timestamp seconds */
|
||||
uint32_t ts_usec; /* timestamp microseconds */
|
||||
uint32_t incl_len; /* number of octets of packet saved in file */
|
||||
uint32_t orig_len; /* actual length of packet */
|
||||
}__attribute__((packed));
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct radiotap_hdr {
|
||||
uint16_t version;
|
||||
uint16_t hdr_length;
|
||||
@@ -67,7 +72,8 @@ namespace foo {
|
||||
uint8_t signal;
|
||||
uint8_t noise;
|
||||
uint8_t antenna;
|
||||
}__attribute__((packed));
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
} // namespace foo
|
||||
} // namespace gr
|
||||
|
||||
Reference in New Issue
Block a user