glib: Allow cross-building with native glib 2.24.
[minipack.git] / patches / gettext / 02-Avoid-missing-open-argument-error.patch
blobaf88a3a4e7a4ab502f37c6c431829b70b5cba1d8
1 diff --git a/gettext-tools/src/write-catalog.c b/gettext-tools/src/write-catalog.c
2 index 0447744..ea4f9cf 100644
3 --- a/gettext-tools/src/write-catalog.c
4 +++ b/gettext-tools/src/write-catalog.c
5 @@ -220,7 +220,9 @@ message catalog has plural form translations, but the output format does not sup
6 /* Open the output file. */
7 if (!to_stdout)
9 - fd = open (filename, O_WRONLY | O_CREAT);
10 + fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
11 + /* 0666 in portable POSIX notation: */
12 + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
13 if (fd < 0)
15 const char *errno_description = strerror (errno);