O_DIRECTORY not supported everywhere, use O_RDONLY.
This commit is contained in:
parent
84df2bb923
commit
eaef3db142
@ -402,9 +402,9 @@ int mqtt3_db_backup(struct mosquitto_db *db, bool shutdown)
|
||||
fsync(fileno(db_fptr));
|
||||
|
||||
if(db->config->persistence_location){
|
||||
dir_fd = open(db->config->persistence_location, O_DIRECTORY);
|
||||
dir_fd = open(db->config->persistence_location, O_RDONLY);
|
||||
}else{
|
||||
dir_fd = open(".", O_DIRECTORY);
|
||||
dir_fd = open(".", O_RDONLY);
|
||||
}
|
||||
if(dir_fd > 0){
|
||||
fsync(dir_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user