/** \file aft.c Audio file table functions. */
+#include <dirent.h> /* readdir() */
#include "para.h"
#include "error.h"
#include "string.h"
#include "afs.h"
#include "net.h"
#include "vss.h"
+#include "fd.h"
static struct osl_table *audio_file_table;
ret = get_chunk_table_of_row(aft_row, &afd->afhi);
if (ret < 0)
return ret;
- ret = mmap_full_file(afd->path, O_RDONLY, &afd->map);
+ ret = mmap_full_file(afd->path, O_RDONLY, &afd->map.data,
+ &afd->map.size, NULL);
if (ret < 0)
goto err;
hash_function(afd->map.data, afd->map.size, file_hash);
goto out_free;
}
/* We still want to add this file. Compute its hash. */
- ret = mmap_full_file(path, O_RDONLY, &map);
+ ret = mmap_full_file(path, O_RDONLY, &map.data, &map.size, NULL);
if (ret < 0)
goto out_free;
hash_function(map.data, map.size, hash);