diff options
Diffstat (limited to 'gcc/ada/s-osprim-solaris.adb')
-rw-r--r-- | gcc/ada/s-osprim-solaris.adb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/s-osprim-solaris.adb b/gcc/ada/s-osprim-solaris.adb index b9709335782..24faae2865a 100644 --- a/gcc/ada/s-osprim-solaris.adb +++ b/gcc/ada/s-osprim-solaris.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2006 Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2007, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -88,7 +88,8 @@ package body System.OS_Primitives is is Rel_Time : Duration; Abs_Time : Duration; - Check_Time : Duration := Clock; + Base_Time : constant Duration := Clock; + Check_Time : Duration := Base_Time; timeval : aliased struct_timeval; begin @@ -114,7 +115,7 @@ package body System.OS_Primitives is C_select (timeout => timeval'Unchecked_Access); Check_Time := Clock; - exit when Abs_Time <= Check_Time; + exit when Abs_Time <= Check_Time or else Check_Time < Base_Time; Rel_Time := Abs_Time - Check_Time; end loop; |