From 4eec7041fc73e64fcc36ec81389dd546eff23e01 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Fri, 17 Jul 2015 09:39:45 -0600 Subject: [PATCH] Move definition of h_errno from lib_parsehostfile.c to lib_netdb. h_errno should still be defined even if there is no host file support. From Sebastien Lorquet. --- libc/netdb/lib_netdb.c | 8 ++++++++ libc/netdb/lib_parsehostfile.c | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/libc/netdb/lib_netdb.c b/libc/netdb/lib_netdb.c index c8e9e4de13..d654a8610a 100644 --- a/libc/netdb/lib_netdb.c +++ b/libc/netdb/lib_netdb.c @@ -52,6 +52,14 @@ struct hostent g_hostent; char g_hostbuffer[CONFIG_NETDB_BUFSIZE]; +/* When the header is included, h_errno shall be available as a + * modifiable lvalue of type int. It is unspecified whether h_errno is a + * macro or an identifier declared with external linkage. + */ + +/* REVISIT: This should at least be per-task? */ +int h_errno; + /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/libc/netdb/lib_parsehostfile.c b/libc/netdb/lib_parsehostfile.c index a815262e4b..f09c5b85c3 100644 --- a/libc/netdb/lib_parsehostfile.c +++ b/libc/netdb/lib_parsehostfile.c @@ -76,17 +76,6 @@ struct hostent_info_s char hi_data[1]; }; -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* When the header is included, h_errno shall be available as a - * modifiable lvalue of type int. It is unspecified whether h_errno is a - * macro or an identifier declared with external linkage. - */ - -/* REVISIT: This should at least be per-task? */ -int h_errno; /**************************************************************************** * Private functions