From d4dd7650f9ff34916929188e2d8f3e0046cb391d Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 29 Nov 2005 15:25:56 +0000 Subject: [PATCH] Add a workaround for systems without wordexp Add a workaround for systems without wordexp (e.g. ulibc). --- src/userfile.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/userfile.c b/src/userfile.c index 38bf6515..173171e6 100644 --- a/src/userfile.c +++ b/src/userfile.c @@ -18,6 +18,9 @@ * */ +#include + +#ifdef HAVE_WORDEXP_H #include #include #include @@ -56,3 +59,14 @@ int snd_user_file(const char *file, char **result) wordfree(&we); 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 */ -- 2.47.1