Skip to content

Commit 5cfbd79

Browse files
committed
pacp: Update to new struct packing syntax
Signed-off-by: Siddharth Chandrasekaran <siddharth.chandrasekaran@huawei.com>
1 parent d447993 commit 5cfbd79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pcap_gen.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@
1414
#define PCAP_VERSION_MINOR 4
1515
#define PCAP_CACHE_SIZE (1 << 12)
1616

17-
struct pcap_header {
17+
PACK(struct pcap_header {
1818
uint32_t magic_number;
1919
uint16_t version_major;
2020
uint16_t version_minor;
2121
uint32_t this_zone;
2222
int32_t sigfigs;
2323
uint32_t snap_len;
2424
uint32_t link_type;
25-
} __packed;
25+
});
2626

27-
struct pcap_record_header {
27+
PACK(struct pcap_record_header {
2828
uint32_t ts_sec;
2929
uint32_t ts_usec;
3030
uint32_t incl_len;
3131
uint32_t orig_len;
32-
} __packed;
32+
});
3333

3434
pcap_t *pcap_start(char *path, uint32_t max_packet_size, uint32_t link_type)
3535
{

0 commit comments

Comments
 (0)