socket.c: Add extern int h_errno for rtems since networking header files are not...

2005-11-21  Joel Sherrill <joel.sherrill@oarcorp.com>

	* socket.c: Add extern int h_errno for rtems since networking header
	files are not available at this point in a tool bootstrap. Newlib
	only has basic C library header files.

From-SVN: r107331
This commit is contained in:
Joel Sherrill 2005-11-21 23:31:50 +00:00 committed by Joel Sherrill
parent 46636d314f
commit 04b5d587d0
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* socket.c: Add extern int h_errno for rtems since networking header
files are not available at this point in a tool bootstrap. Newlib
only has basic C library header files.
2005-11-19 Richard Guenther <rguenther@suse.de>
Roger Sayle <roger@eyesopen.com>

View File

@ -189,6 +189,13 @@ __gnat_get_h_errno (void) {
}
#elif defined(VMS)
return errno;
#elif defined(__rtems__)
/* At this stage in the tool build, no networking .h files are available.
Newlib does not provide networking .h files and RTEMS is not built yet.
So we need to explicitly extern h_errno to access it.
*/
extern int h_errno;
return h_errno;
#else
return h_errno;
#endif