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

@@ -46,8 +46,10 @@
#include <netinet/in.h>
#endif
#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
#define SLIRP_PACKED __attribute__((gcc_struct, packed))
#if defined(_MSC_VER) && !defined(__clang__)
#define SLIRP_PACKED
#elif defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
#define SLIRP_PACKED __attribute__((gcc_struct, packed))
#else
#define SLIRP_PACKED __attribute__((packed))
#endif