vulkan: fix the open() flags

The second argument are the flags, the mode is not needed for
RDONLY. Accidentally works because O_RDONLY is 0 but ignored the
O_CLOEXEC flags.
This commit is contained in:
Wim Taymans 2026-05-06 11:44:23 +02:00
parent 364436dd31
commit 59a5392850

View file

@ -165,7 +165,7 @@ static VkShaderModule createShaderModule(struct vulkan_compute_state *s, const c
int fd;
struct stat stat;
if ((fd = open(shaderFile, 0, O_RDONLY | O_CLOEXEC)) == -1) {
if ((fd = open(shaderFile, O_RDONLY | O_CLOEXEC)) == -1) {
spa_log_error(s->log, "can't open %s: %m", shaderFile);
return VK_NULL_HANDLE;
}