diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c index 38d60bf68..b798d7cd1 100644 --- a/gio/gopenuriportal.c +++ b/gio/gopenuriportal.c @@ -31,9 +31,6 @@ #include "gunixfdlist.h" #endif -#ifndef O_PATH -#define O_PATH 0 -#endif #ifndef O_CLOEXEC #define O_CLOEXEC 0 #else @@ -107,7 +104,7 @@ g_openuri_portal_open_uri (const char *uri, path = g_file_get_path (file); - fd = g_open (path, O_PATH | O_CLOEXEC); + fd = g_open (path, O_RDONLY | O_CLOEXEC); errsv = errno; if (fd == -1) { @@ -318,7 +315,7 @@ g_openuri_portal_open_uri_async (const char *uri, g_object_set_data (G_OBJECT (task), "open-file", GINT_TO_POINTER (TRUE)); path = g_file_get_path (file); - fd = g_open (path, O_PATH | O_CLOEXEC); + fd = g_open (path, O_RDONLY | O_CLOEXEC); errsv = errno; if (fd == -1) {