add DragonFlyBSD build support (except test/)

due to undefined reference to 'environ' error, ucm_exec.c uses workaround.

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:
SASANO Takayoshi 2022-07-13 21:36:59 +09:00 committed by Jaroslav Kysela
parent f89245ee66
commit 60c1430b43
4 changed files with 8 additions and 4 deletions

View file

@ -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(__OpenBSD__) && !defined(__sun) && !defined(ANDROID)
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(ANDROID)
#define SORTFUNC versionsort64
#else
#define SORTFUNC alphasort64

View file

@ -44,7 +44,7 @@
*
*/
#if !defined(__OpenBSD__)
#if !defined(__OpenBSD__) && !defined(__DragonFly__)
union semun {
int val; /* Value for SETVAL */
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */

View file

@ -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(__OpenBSD__) && !defined(__sun) && !defined(ANDROID)
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__sun) && !defined(ANDROID)
#define SORTFUNC versionsort64
#else
#define SORTFUNC alphasort64

View file

@ -33,10 +33,14 @@
#include <limits.h>
#include <dirent.h>
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
#include <signal.h>
#if defined(__DragonFly__)
#define environ NULL /* XXX */
#else
extern char **environ;
#endif
#endif
static pthread_mutex_t fork_lock = PTHREAD_MUTEX_INITIALIZER;