Replace %m conversion specifier with %s and strerror()

When compiling with `-Wall` and `-pedantic-errors`, gcc complains with
```
warning: ISO C does not support the '%m' gnu_printf format [-Wformat=]
```
because the `%m` conversion specifier is a GNU extension.

Closes #1702.

(cherry picked from commit d4f5074535)
This commit is contained in:
Luflosi 2020-05-25 15:42:52 +02:00 committed by Camilla Löwy
parent 8b63ca53de
commit a8e5c530ee

View File

@ -208,8 +208,8 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
if (fd < 0)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Creating a buffer file for %d B failed: %m",
length);
"Wayland: Creating a buffer file for %d B failed: %s",
length, strerror(errno));
return NULL;
}
@ -217,7 +217,7 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
if (data == MAP_FAILED)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: mmap failed: %m");
"Wayland: mmap failed: %s", strerror(errno));
close(fd);
return NULL;
}