* lib/mknodat.c (rpl_mknodat): On Haiku, handle S_IFIFO explicitly.
* doc/posix-functions/mknodat.texi: Mention the S_IFIFO flag bug.
+2024-08-30 Bruno Haible <bruno@clisp.org>
+
+ mkfifoat: Work around a Haiku bug.
+ * lib/mknodat.c (rpl_mknodat): On Haiku, handle S_IFIFO explicitly.
+ * doc/posix-functions/mknodat.texi: Mention the S_IFIFO flag bug.
+
2024-08-30 Bruno Haible <bruno@clisp.org>
posix_openpt tests: Fix test failure on Haiku.
This function does not fail when the file name argument ends in a slash
and (without the slash) names a nonexistent file, on some platforms:
AIX 7.2.
+@item
+This function does not handle the @code{S_IFIFO} flag on some platforms:
+@c https://dev.haiku-os.org/ticket/19032
+Haiku.
@end itemize
Portability problems not fixed by Gnulib:
return -1;
}
+# if defined __HAIKU__
+ /* POSIX requires mknodat to create fifos for non-privileged processes, but
+ on Haiku it fails with ENOTSUP. */
+ if (S_ISFIFO (mode) && dev == 0)
+ return mkfifo (file, mode & ~S_IFIFO);
+# endif
return mknodat (fd, file, mode, dev);
}