Allow compilation without pthread support

This commit is contained in:
Andrea Mazzoleni 2016-03-18 18:45:35 +01:00
parent fe3ad31cbb
commit 8d3cefb302
4 changed files with 37 additions and 15 deletions

View file

@ -355,6 +355,7 @@ struct snapraid_disk {
int mapping_idx; /**< Index in the mapping vector. Used only as buffer when writing the content file. */
int skip_access; /**< If the disk is inaccessible and it should be skipped. */
#if HAVE_PTHREAD
/**
* Mutex for protecting the filesystem structure.
*
@ -365,6 +366,7 @@ struct snapraid_disk {
* change during multithread processing.
*/
pthread_mutex_t fs_mutex;
#endif
/**
* Mapping of chunks in the parity.