diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-05-31 15:21:04 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-01 13:16:02 +0200 |
commit | bcaaa53a7527734917753887238967a698647ac2 (patch) | |
tree | 45a4f8d99bec8ecd323e74a06b00450d1dc1ae3b | |
parent | 961a676e93fe7d599d3856e63bd132fe0d2decb2 (diff) | |
download | slirp-bcaaa53a7527734917753887238967a698647ac2.zip slirp-bcaaa53a7527734917753887238967a698647ac2.tar.gz slirp-bcaaa53a7527734917753887238967a698647ac2.tar.bz2 |
Fix win32 builds by using the SLIRP_PACKED definition
A packed struct needs different gcc attributes for compilations
with MinGW compilers because glib-2.0 adds compiler flag
-mms-bitfields which modifies the packing algorithm.
Attribute gcc_struct reverses the negative effects of -mms-bitfields.
We already have the SLIRP_PACKED definition for that, use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r-- | src/tftp.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,6 +4,8 @@ #ifndef SLIRP_TFTP_H #define SLIRP_TFTP_H +#include "util.h" + #define TFTP_SESSIONS_MAX 20 #define TFTP_SERVER 69 @@ -32,7 +34,7 @@ struct tftp_t { } tp_error; char tp_buf[TFTP_BLOCKSIZE_MAX + 2]; } x; -} __attribute__((packed)); +} SLIRP_PACKED; struct tftp_session { Slirp *slirp; |