endif
foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h',
- 'cet.h', 'pthread_np.h', 'renderdoc_app.h']
+ 'cet.h', 'pthread_np.h', 'renderdoc_app.h', 'sys/inotify.h']
if cc.check_header(h)
pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
endif
}
}
+#ifdef FOZ_DB_UTIL_DYNAMIC_LIST
static bool
check_file_already_loaded(struct foz_db *foz_db,
FILE *db_file,
return true;
}
+#endif
/* Here we open mesa cache foz dbs files. If the files exist we load the index
* db into a hash table. The index db contains the offsets needed to later
if (foz_dbs_ro)
load_foz_dbs_ro(foz_db, foz_dbs_ro);
+#ifdef FOZ_DB_UTIL_DYNAMIC_LIST
char *foz_dbs_list =
getenv("MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST");
if (foz_dbs_list)
foz_dbs_list_updater_init(foz_db, foz_dbs_list);
+#endif
return true;
void
foz_destroy(struct foz_db *foz_db)
{
+#ifdef FOZ_DB_UTIL_DYNAMIC_LIST
struct foz_dbs_list_updater *updater = &foz_db->updater;
if (updater->thrd) {
inotify_rm_watch(updater->inotify_fd, updater->inotify_wd);
thrd_join(updater->thrd, NULL);
close(updater->inotify_fd);
}
+#endif
if (foz_db->db_idx)
fclose(foz_db->db_idx);