summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2022-05-19 18:37:46 +0200
committerJaroslav Kysela <perex@perex.cz>2022-05-20 09:55:12 +0200
commit4fb83669ef5871222dc633f091a7a5ec4d9688f4 (patch)
tree8f57b8642950794a9d5c497ba8ffdca865415b49
parentedec439a0ce5f81bfc9fdf1ec3d261ebcc1df95a (diff)
downloadalsa-lib-4fb83669ef5871222dc633f091a7a5ec4d9688f4.tar.gz
pcm: ladspa - Use LFS calls (readdir64)
Continue the work in commit ba86ac55 ("conf: Use LFS calls when reading config files") and fix the PCM LADSPA code, too. Fixes: https://github.com/alsa-project/alsa-lib/pull/223 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--src/pcm/pcm_ladspa.c5
-rw-r--r--src/pcm/pcm_local.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
index ad73347d..9b2b32d7 100644
--- a/src/pcm/pcm_ladspa.c
+++ b/src/pcm/pcm_ladspa.c
@@ -32,6 +32,7 @@
* http://www.medianet.ag
*/
+#include "config.h"
#include <dirent.h>
#include <locale.h>
#include <math.h>
@@ -1147,7 +1148,7 @@ static int snd_pcm_ladspa_check_dir(snd_pcm_ladspa_plugin_t * const plugin,
const unsigned long ladspa_id)
{
DIR *dir;
- struct dirent * dirent;
+ struct dirent64 * dirent;
int len = strlen(path), err;
int need_slash;
char *filename;
@@ -1161,7 +1162,7 @@ static int snd_pcm_ladspa_check_dir(snd_pcm_ladspa_plugin_t * const plugin,
return -ENOENT;
while (1) {
- dirent = readdir(dir);
+ dirent = readdir64(dir);
if (!dirent) {
closedir(dir);
return 0;
diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
index 6f03365c..8d25971f 100644
--- a/src/pcm/pcm_local.h
+++ b/src/pcm/pcm_local.h
@@ -20,6 +20,8 @@
*
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>