diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:39 +0000 |
commit | 289262a517ab91e32d5982dee4c1cdc9c9d7e75a (patch) | |
tree | 4fec5a9696c211c3e5cc570327077f5ba290b6d4 /debian/patches/5-fputc.patch | |
parent | Adding upstream version 1.0.1. (diff) | |
download | meson-debian.tar.xz meson-debian.zip |
Adding debian version 1.0.1-5.debian/1.0.1-5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/patches/5-fputc.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/patches/5-fputc.patch b/debian/patches/5-fputc.patch new file mode 100644 index 0000000..26e9f21 --- /dev/null +++ b/debian/patches/5-fputc.patch @@ -0,0 +1,24 @@ +diff --git a/test cases/common/105 generatorcustom/gen.c b/test cases/common/105 generatorcustom/gen.c +index 59518c0ef..964ae7e9c 100644 +--- a/test cases/common/105 generatorcustom/gen.c ++++ b/test cases/common/105 generatorcustom/gen.c +@@ -22,9 +22,17 @@ int main(int argc, const char ** argv) { + fprintf(output, "#pragma once\n"); + fprintf(output, "#define "); + +- char c; ++ int bytes_copied = 0; ++ int c; + while((c = fgetc(input)) != EOF) { +- fputc(c, output); ++ if(fputc(c, output) == EOF) { ++ fprintf(stderr, "Writing to output file failed.\n"); ++ return 1; ++ } ++ if(++bytes_copied > 10000) { ++ fprintf(stderr, "File copy stuck in an eternal loop!\n"); ++ return 1; ++ } + } + fputc('\n', output); + |