mirror of
https://github.com/coreutils/coreutils.git
synced 2026-10-28 09:44:34 +08:00
build: avoid build failure without sys/mtio.h
* m4/jm-macros.m4: Check for the header. * src/dd.c: Avoid the workaround where the header is not available (on non glibc systems). * src/shred.c: Likewise.
This commit is contained in:
1 parent
b697bac049
commit
8fb32039bc
3 files changed
+4
-3
No files matched your search
@@ -211,6 +211,7 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS],
|
||||
paths.h
|
||||
priv.h
|
||||
stropts.h
|
||||
sys/mtio.h
|
||||
sys/param.h
|
||||
sys/systeminfo.h
|
||||
syslog.h
|
||||
|
||||
@@ -1720,7 +1720,7 @@ advance_input_offset (uintmax_t offset)
|
||||
The offending behavior has been confirmed with an Exabyte SCSI tape
|
||||
drive accessed via /dev/nst0 on both Linux 2.2.17 and 2.4.16 kernels. */
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_SYS_MTIO_H
|
||||
|
||||
# include <sys/mtio.h>
|
||||
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@
|
||||
#include <assert.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_SYS_MTIO_H
|
||||
# include <sys/mtio.h>
|
||||
#endif
|
||||
|
||||
@@ -391,7 +391,7 @@ dorewind (int fd, struct stat const *st)
|
||||
{
|
||||
if (S_ISCHR (st->st_mode))
|
||||
{
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_SYS_MTIO_H
|
||||
/* In the Linux kernel, lseek does not work on tape devices; it
|
||||
returns a randomish value instead. Try the low-level tape
|
||||
rewind operation first. */
|
||||
|
||||
Reference in new issue
Block a user