From 9db6ee8d2fa48ade4451c0de80980b7f242c0f17 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 20 Sep 2002 20:34:06 +0000 Subject: * sysdeps/generic/ifreq.h (__if_nextreq): New function. * sysdeps/unix/sysv/linux/ifreq.h (__if_nextreq): New function. * sysdeps/mach/hurd/ifreq.h (__if_nextreq): New function. * sysdeps/gnu/ifaddrs.c (getifaddrs): Use __if_nextreq for iterating through the list of interfaces. * resolv/res_hconf.c (_res_hconf_reorder_addrs): Likewise. * sysdeps/unix/grantpt.c (pts_name): Set errno when __ptsname_r fails. Reported by Bruno Haible . --- sysdeps/unix/grantpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/grantpt.c') diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index 5f27ce91e3..98d601cf67 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -55,7 +55,8 @@ pts_name (int fd, char **pts, size_t buf_len) /* ptsname_r returns with ENOTTY to indicate a descriptor not referring to a pty master. For this condition, grantpt must return EINVAL. */ - errno = EINVAL; + rv = EINVAL; + errno = rv; /* Not necessarily set by __ptsname_r. */ break; } -- cgit 1.4.1