termux-packages/packages/gcc/libcpp-files.c.patch
Fredrik Fornwall 98cc1d7b97 gcc: Update from 4.93 to 5.3.0
Also, start depending on the libgcc package for the libgcc.a runtime
library taken from the NDK instead of trying to build it ourselves.
2016-03-20 18:59:41 -04:00

19 lines
612 B
Diff

diff -u -r ../gcc-4.8.2/libcpp/files.c ./libcpp/files.c
--- ../gcc-4.8.2/libcpp/files.c 2013-03-06 17:18:40.000000000 +0100
+++ ./libcpp/files.c 2014-01-09 00:29:34.940181542 +0100
@@ -716,11 +716,13 @@
cpp_error (pfile, CPP_DL_WARNING,
"%s is shorter than expected", file->path);
+ off_t ot = (off_t) &file->st.st_size;
file->buffer = _cpp_convert_input (pfile,
CPP_OPTION (pfile, input_charset),
buf, size + 16, total,
&file->buffer_start,
- &file->st.st_size);
+ &ot);
+ file->st.st_size = ot;
file->buffer_valid = true;
return true;