slirp: fix packed structs on MSVC

This commit is contained in:
David Hrdlička
2020-12-16 20:39:50 +01:00
parent b11226321e
commit a22b9a0eb5
5 changed files with 46 additions and 2 deletions

View File

@@ -20,6 +20,9 @@
#define TFTP_FILENAME_MAX 512
#define TFTP_BLOCKSIZE_MAX 1428
#if defined(_MSC_VER) && !defined (__clang__)
#pragma pack(push, 1)
#endif
struct tftp_t {
struct udphdr udp;
uint16_t tp_op;
@@ -35,6 +38,9 @@ struct tftp_t {
char tp_buf[TFTP_BLOCKSIZE_MAX + 2];
} x;
} SLIRP_PACKED;
#if defined(_MSC_VER) && !defined (__clang__)
#pragma pack(pop)
#endif
struct tftp_session {
Slirp *slirp;