X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=aae6d66b0bfbd511fb7a7aabbf14f2c1dbab74a7;hp=b9db5a819fd13ebf7f780a0afdfe20d63cbc14f5;hb=97f53e18953fc2013c0b14f0261ac385e45b0284;hpb=cd38753609763dbc55e72a7df446837792628d6d diff --git a/aft.c b/aft.c index b9db5a81..aae6d66b 100644 --- a/aft.c +++ b/aft.c @@ -6,6 +6,7 @@ /** \file aft.c Audio file table functions. */ +#include /* readdir() */ #include "para.h" #include "error.h" #include "string.h" @@ -15,6 +16,7 @@ #include "afs.h" #include "net.h" #include "vss.h" +#include "fd.h" static struct osl_table *audio_file_table; @@ -638,7 +640,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data * 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); @@ -1571,7 +1574,7 @@ static int add_one_audio_file(const char *path, const void *private_data) 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);