static inline void insert_lost_records(struct t_buf *buf)
{
- struct {
+ struct __packed {
u32 lost_records;
u16 did, vid;
u64 first_tsc;
- } __attribute__((packed)) ed;
+ } ed;
ed.vid = current->vcpu_id;
ed.did = current->domain->domain_id;
void __trace_hypercall(uint32_t event, unsigned long op,
const unsigned long *args)
{
- struct {
+ struct __packed {
uint32_t op;
uint32_t args[6];
- } __attribute__((packed)) d;
+ } d;
uint32_t *a = d.args;
#define APPEND_ARG32(i) \
*/
-struct lzma_header {
+struct __packed lzma_header {
uint8_t pos;
uint32_t dict_size;
uint64_t dst_size;
-} __attribute__ ((packed)) ;
+};
#define LZMA_BASE_SIZE 1846
* For most devices, interfaces don't coordinate with each other, so
* such requests may be made at any time.
*/
-struct usb_ctrlrequest {
+struct __packed usb_ctrlrequest {
u8 bRequestType;
u8 bRequest;
__le16 wValue;
__le16 wIndex;
__le16 wLength;
-} __attribute__ ((packed));
+};
/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */
#define USB_DT_DEBUG 0x0a
-struct usb_debug_descriptor {
+struct __packed usb_debug_descriptor {
u8 bLength;
u8 bDescriptorType;
/* bulk endpoints with 8 byte maxpacket */
u8 bDebugInEndpoint;
u8 bDebugOutEndpoint;
-} __attribute__((packed));
+};
#define USB_DEBUG_DEVNUM 127
#define __DEFINE_COMPAT_HANDLE(name, type) \
typedef struct { \
compat_ptr_t c; \
- type *_[0] __attribute__((__packed__)); \
+ type *_[0] __packed; \
} __compat_handle_ ## name
#define DEFINE_COMPAT_HANDLE(name) \
#define noreturn __attribute__((noreturn))
+#define __packed __attribute__((packed))
+
#if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
#define unreachable() do {} while (1)
#else