flex: Patch Makefile.in instead of Makefile.am
[termux-packages] / packages / gperf / output.cc.patch
CommitLineData
8a38dbec
A
1--- ./src/output.cc
2+++ ../src/output.cc
3@@ -2083,6 +2083,16 @@
4 }
5 printf ("\n");
6
7+ // Include stdlib.h or cstdlib header to fix errors about size_t
8+ if (option[KRC] || option[C] || option[ANSIC])
9+ {
10+ printf("#include <stdlib.h>\n\n");
11+ }
12+ else if (option[CPLUSPLUS])
13+ {
14+ printf("#include <cstdlib>\n\n");
15+ }
16+
17 if (_charset_dependent
18 && (_key_positions.get_size() > 0 || option[UPPERLOWER]))
19 {