]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++tools: Include <cstdlib> for exit [PR100731]
authorJakub Jelinek <jakub@redhat.com>
Tue, 25 May 2021 14:44:35 +0000 (16:44 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 31 May 2021 11:54:44 +0000 (13:54 +0200)
This TU uses exit, but doesn't include <stdlib.h> or <cstdlib> and relies
on some other header to include it indirectly, which apparently doesn't
happen on reporter's host.

The other <c*> headers aren't guarded either and we rely on a compiler
capable of C++11, so maybe we can rely on <cstdlib> being around
unconditionally.

2021-05-25  Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/100731
* server.cc: Include <cstdlib>.

(cherry picked from commit 7a5e9a58fbe27d8b8f04cd18bc6e1dd736e3cd12)

c++tools/server.cc

index 21c7d468aa0294e0c4b5c1f47de84cfd6328e60e..6ba63fa8ed4a638606ac115ecd60bd6598b02a58 100644 (file)
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include <csignal>
 #include <cstring>
 #include <cstdarg>
+#include <cstdlib>
 // OS
 #include <unistd.h>
 #include <sys/types.h>