[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] build: avoid build failure without sys/mtio.h
From: |
Pádraig Brady |
Subject: |
[PATCH] build: avoid build failure without sys/mtio.h |
Date: |
Sat, 9 Dec 2017 20:18:10 -0800 |
* m4/jm-macros.m4: Check for the header.
* src/dd.c: Avoid the workaround where the header
is not available (on non glibc systems).
---
m4/jm-macros.m4 | 1 +
src/dd.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 399f69b..5aef4ba 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -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
diff --git a/src/dd.c b/src/dd.c
index 7b3d2fd..7898116 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -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.9.3
- [PATCH] build: avoid build failure without sys/mtio.h,
Pádraig Brady <=