[Ada] Fix PR ada/104767

Eric Botcazou botcazou@adacore.com
Thu Mar 24 10:35:24 GMT 2022


This is a regression present on mainline, 11 and 10 branches.  When the serial 
port is closed, we need to ensure that the port handle is properly reset for 
it to be detected as closed.

Tested on x86-64/Linux, applied on mainline, 11 and 10 branches.


2022-03-24  Pascal Obry  <obry@adacore.com>

	PR ada/104767
	* libgnat/g-sercom__mingw.adb (Close): Reset port handle to -1.
	* libgnat/g-sercom__linux.adb (Close): Likewise.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220324/0159c5d7/attachment.bin>


More information about the Gcc-patches mailing list