Revert "xz: Use pipe2() if available."
This reverts commit 7a11c4a8e5
.
It is a problem when libc has pipe2() but the kernel is too
old to have pipe2() and thus pipe2() fails. In xz it's pointless
to have a fallback for non-functioning pipe2(); it's better to
avoid pipe2() completely.
Thanks to Michael Fox for the bug report.
This commit is contained in:
parent
eccd8155e1
commit
db190a832c
|
@ -626,8 +626,8 @@ gl_GETOPT
|
|||
# Find the best function to set timestamps.
|
||||
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
|
||||
|
||||
# These are nice to have but not mandatory.
|
||||
AC_CHECK_FUNCS([posix_fadvise pipe2])
|
||||
# This is nice to have but not mandatory.
|
||||
AC_CHECK_FUNCS([posix_fadvise])
|
||||
|
||||
TUKLIB_PROGNAME
|
||||
TUKLIB_INTEGER
|
||||
|
|
|
@ -82,13 +82,7 @@ io_init(void)
|
|||
// we are root.
|
||||
warn_fchown = geteuid() == 0;
|
||||
|
||||
// Create a pipe for the self-pipe trick. If pipe2() is available,
|
||||
// we can avoid the fcntl() calls.
|
||||
# ifdef HAVE_PIPE2
|
||||
if (pipe2(user_abort_pipe, O_NONBLOCK))
|
||||
message_fatal(_("Error creating a pipe: %s"),
|
||||
strerror(errno));
|
||||
# else
|
||||
// Create a pipe for the self-pipe trick.
|
||||
if (pipe(user_abort_pipe))
|
||||
message_fatal(_("Error creating a pipe: %s"),
|
||||
strerror(errno));
|
||||
|
@ -102,7 +96,6 @@ io_init(void)
|
|||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __DJGPP__
|
||||
// Avoid doing useless things when statting files.
|
||||
|
|
Loading…
Reference in New Issue