media-session: ifdef Linux-specific file option

This commit is contained in:
Greg V 2020-11-09 00:40:25 +03:00 committed by Wim Taymans
parent fba8cd9f56
commit cc0386e1c5

View file

@ -1793,6 +1793,10 @@ static int state_dir(struct sm_media_session *sess)
"%s/.config/pipewire-media-session/", home_dir); "%s/.config/pipewire-media-session/", home_dir);
} }
#ifndef O_PATH
#define O_PATH 0
#endif
if ((res = open(impl->state_dir, O_CLOEXEC | O_DIRECTORY | O_PATH)) < 0) { if ((res = open(impl->state_dir, O_CLOEXEC | O_DIRECTORY | O_PATH)) < 0) {
if (errno == ENOENT) { if (errno == ENOENT) {
pw_log_info("creating state directory %s", impl->state_dir); pw_log_info("creating state directory %s", impl->state_dir);