public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH,hurd] Fix arbitrary error code
@ 2022-04-12  9:44 Samuel Thibault
  2022-04-12  9:53 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Thibault @ 2022-04-12  9:44 UTC (permalink / raw)
  To: libc-alpha, Florian Weimer

ELIBBAD is Linux-specific, Hurd has EGRATUITOUS instead.

diff --git a/nss/nss_test_errno.c b/nss/nss_test_errno.c
index 680f8a07b9..d27368f4f3 100644
--- a/nss/nss_test_errno.c
+++ b/nss/nss_test_errno.c
@@ -28,7 +28,13 @@ static void __attribute__ ((constructor))
 init (void)
 {
   /* An arbitrary error code which is otherwise not used.  */
+#if defined(__linux__)
   errno = ELIBBAD;
+#elif defined(__GNU__)
+  errno = EGRATUITOUS;
+#else
+#error missing arbitrary error code
+#endif
 }
 
 /* Lookup functions for pwd follow that do not return any data.  */

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-12 20:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12  9:44 [PATCH,hurd] Fix arbitrary error code Samuel Thibault
2022-04-12  9:53 ` Florian Weimer
2022-04-12  9:57   ` Samuel Thibault
2022-04-12 10:31     ` Florian Weimer
2022-04-12 20:18       ` Samuel Thibault
2022-04-12 20:45     ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).