]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: ladspa - Use LFS calls (readdir64)
authorJaroslav Kysela <perex@perex.cz>
Thu, 19 May 2022 16:37:46 +0000 (18:37 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 20 May 2022 07:55:12 +0000 (09:55 +0200)
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>
src/pcm/pcm_ladspa.c
src/pcm/pcm_local.h

index ad73347d2930bf878a68a6268e79896792a8fd28..9b2b32d7515a40ed6419f265b1886126858d866f 100644 (file)
@@ -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;
index 6f03365ccd09964ce0885c1658b26ff03b9c7e85..8d25971f6e094e4021aada1fc53e9482cd9097c4 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>