mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-11 13:30:05 -05:00
add NetBSD/OpenBSD build support (except test/)
Fixes: https://github.com/alsa-project/alsa-lib/pull/250 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e288ca7c29
commit
b33ef3f73d
14 changed files with 52 additions and 17 deletions
10
src/async.c
10
src/async.c
|
|
@ -54,6 +54,15 @@ static LIST_HEAD(snd_async_handlers);
|
|||
|
||||
static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
|
||||
{
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
/* siginfo_t does not have si_fd */
|
||||
struct list_head *i;
|
||||
list_for_each(i, &snd_async_handlers) {
|
||||
snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
|
||||
if (h->callback)
|
||||
h->callback(h);
|
||||
}
|
||||
#else
|
||||
int fd;
|
||||
struct list_head *i;
|
||||
//assert(siginfo->si_code == SI_SIGIO);
|
||||
|
|
@ -66,6 +75,7 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, vo
|
|||
if (h->fd == fd && h->callback)
|
||||
h->callback(h);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue