Skip to content
Snippets Groups Projects
Commit 277dd6ea authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Fix std::random_device for avr

This fixes a build failure that affects avr, but could affect other
targets in theory. The _M_fini function should not try to use ::open or
::fopen if _GLIBCXX_USE_DEV_RANDOM is not defined, because no file can
ever have been opened.

libstdc++-v3/ChangeLog:

	* src/c++11/random.cc (random_device::_M_fini): Do not try to
	close the file handle if the target doesn't support the
	/dev/random and /dev/urandom files.
parent 2d2e163d
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment