Merge branch 'epoll-fix32' into 'master'

spa: system: make spa_poll_event compatible with epoll_events

See merge request pipewire/pipewire!2774
This commit is contained in:
Pauli Virtanen 2026-04-06 10:24:36 +00:00
commit 12bdaf3286
2 changed files with 11 additions and 2 deletions

View file

@ -59,8 +59,15 @@ struct spa_system { struct spa_interface iface; };
struct spa_poll_event { struct spa_poll_event {
uint32_t events; uint32_t events;
union {
void *data; void *data;
} __attribute__ ((packed)); uint64_t data_u64;
};
#ifdef __x86_64__
} __attribute__((packed));
#else
};
#endif
struct spa_system_methods { struct spa_system_methods {
#define SPA_VERSION_SYSTEM_METHODS 1 #define SPA_VERSION_SYSTEM_METHODS 1

View file

@ -31,6 +31,8 @@ SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.system");
#endif #endif
SPA_STATIC_ASSERT(sizeof(struct spa_poll_event) == sizeof(struct epoll_event)); SPA_STATIC_ASSERT(sizeof(struct spa_poll_event) == sizeof(struct epoll_event));
SPA_STATIC_ASSERT(offsetof(struct spa_poll_event, events) == offsetof(struct epoll_event, events));
SPA_STATIC_ASSERT(offsetof(struct spa_poll_event, data) == offsetof(struct epoll_event, data.ptr));
struct impl { struct impl {
struct spa_handle handle; struct spa_handle handle;