Fix PR ada/48711

Submitted by Eric Botcazou on July 14, 2011, 9:18 a.m.

Details

Message ID 201107141118.34913.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou July 14, 2011, 9:18 a.m.
This is the build failure of GNAT 4.6.x on Windows.  The patch was posted in 
September of last year: http://gcc.gnu.org/ml/gcc/2010-09/msg00228.html

Applied on the mainline and 4.6 branch.


2011-07-14  Florian Weimer  <fw@deneb.enyo.de>

	PR ada/48711
	* g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.

Patch hide | download patch | download mbox

Index: g-socthi-mingw.adb
===================================================================
--- g-socthi-mingw.adb	(revision 176261)
+++ g-socthi-mingw.adb	(working copy)
@@ -277,7 +277,8 @@  package body GNAT.Sockets.Thin is
       use type C.size_t;
 
       Fill  : constant Boolean :=
-                (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
+	SOSC.MSG_WAITALL /= -1
+	and then (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
       --  Is the MSG_WAITALL flag set? If so we need to fully fill all vectors
 
       Res   : C.int;