This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH,HURD] socket: fix errno code
- From: Pino Toscano <toscano dot pino at tiscali dot it>
- To: libc-alpha at sourceware dot org
- Cc: roland at gnu dot org,bug-hurd at gnu dot org
- Date: Sun, 22 Jan 2012 15:58:50 +0100
- Subject: [PATCH,HURD] socket: fix errno code
Hi,
attached there is a small patch to fix the errno value for the "protocol
not supported" case, from the non-standard EPFNOSUPPORT to EAFNOSUPPORT.
Thanks,
--
Pino Toscano
2012-01-22 Pino Toscano <toscano.pino@tiscali.it>
* sysdeps/mach/hurd/socket.c (__socket): Return EAFNOSUPPORT instead
of the non-standard EPFNOSUPPORT.
--- a/sysdeps/mach/hurd/socket.c
+++ b/sysdeps/mach/hurd/socket.c
@@ -57,7 +57,7 @@ __socket (domain, type, protocol)
isn't supported. */
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED
|| err == MIG_BAD_ID || err == EOPNOTSUPP)
- err = EPFNOSUPPORT;
+ err = EAFNOSUPPORT;
if (err)
return __hurd_fail (err);