mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-06 04:06:34 -05:00
add NetBSD/OpenBSD build support (except test/)
This commit is contained in:
parent
07fe82cb9b
commit
455e8c4229
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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4115,7 +4115,7 @@ static int config_file_load(snd_config_t *root, const char *fn, int errors)
|
|||
if (!S_ISDIR(st.st_mode))
|
||||
return config_file_open(root, fn);
|
||||
#ifndef DOC_HIDDEN
|
||||
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(ANDROID)
|
||||
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__sun) && !defined(ANDROID)
|
||||
#define SORTFUNC versionsort64
|
||||
#else
|
||||
#define SORTFUNC alphasort64
|
||||
|
|
|
|||
|
|
@ -660,7 +660,9 @@ playback devices.
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <ctype.h>
|
||||
|
|
|
|||
|
|
@ -44,12 +44,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if !defined(__OpenBSD__)
|
||||
union semun {
|
||||
int val; /* Value for SETVAL */
|
||||
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
|
||||
unsigned short *array; /* Array for GETALL, SETALL */
|
||||
#if defined(__linux__)
|
||||
struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <poll.h>
|
||||
#include <sys/mman.h>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include "local.h"
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
#ifdef HAVE_SYS_SHM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <poll.h>
|
||||
|
|
|
|||
|
|
@ -2907,7 +2907,7 @@ int uc_mgr_scan_master_configs(const char **_list[])
|
|||
snprintf(filename, sizeof(filename), "%s/ucm2/conf.virt.d",
|
||||
snd_config_topdir());
|
||||
|
||||
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(ANDROID)
|
||||
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__sun) && !defined(ANDROID)
|
||||
#define SORTFUNC versionsort64
|
||||
#else
|
||||
#define SORTFUNC alphasort64
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@
|
|||
#include <limits.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <signal.h>
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
static pthread_mutex_t fork_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue