mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Add a workaround for systems without wordexp
Add a workaround for systems without wordexp (e.g. ulibc).
This commit is contained in:
parent
d9680921a9
commit
d4dd7650f9
1 changed files with 14 additions and 0 deletions
|
|
@ -18,6 +18,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_WORDEXP_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <wordexp.h>
|
#include <wordexp.h>
|
||||||
|
|
@ -56,3 +59,14 @@ int snd_user_file(const char *file, char **result)
|
||||||
wordfree(&we);
|
wordfree(&we);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* !HAVE_WORDEXP_H */
|
||||||
|
/* just copy the string - would be nicer to expand by ourselves, though... */
|
||||||
|
int snd_user_file(const char *file, char **result)
|
||||||
|
{
|
||||||
|
*result = strdup(file);
|
||||||
|
if (! *result)
|
||||||
|
return -ENOMEM;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* HAVE_WORDEXP_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue