diff mbox

[committed] Fix lto build if WCONTINUED is not defined (PR lto/60571)

Message ID 20140319072432.GB22862@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek March 19, 2014, 7:24 a.m. UTC
Hi!

WCONTINUED is (recent) Linux specific, so it doesn't have to be defined
on other hosts, or could be missing even on older Linux distros (e.g. glibc
2.3.2 doesn't have it).

Fixed thusly, committed as obvious.

2014-03-19  Jakub Jelinek  <jakub@redhat.com>

	PR lto/60571
	* lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
	Fix formatting.


	Jakub
diff mbox

Patch

--- gcc/lto/lto.c.jj	2014-03-03 08:24:32.000000000 +0100
+++ gcc/lto/lto.c	2014-03-19 08:12:39.235144361 +0100
@@ -2476,7 +2476,10 @@  wait_for_child ()
   int status;
   do
     {
-      int w = waitpid(0, &status, WUNTRACED | WCONTINUED);
+#ifndef WCONTINUED
+#define WCONTINUED 0
+#endif
+      int w = waitpid (0, &status, WUNTRACED | WCONTINUED);
       if (w == -1)
 	fatal_error ("waitpid failed");
 
@@ -2485,7 +2488,7 @@  wait_for_child ()
       else if (WIFSIGNALED (status))
 	fatal_error ("streaming subprocess was killed by signal");
     }
-  while (!WIFEXITED(status) && !WIFSIGNALED(status));
+  while (!WIFEXITED (status) && !WIFSIGNALED (status));
 }
 #endif