summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Utilities/cmtar/CMakeLists.txt1
-rw-r--r--Utilities/cmtar/config.h.in3
-rw-r--r--Utilities/cmtar/extract.c4
-rw-r--r--Utilities/cmtar/libtar.c1
4 files changed, 9 insertions, 0 deletions
diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt
index 1a5b35f..48a3efa 100644
--- a/Utilities/cmtar/CMakeLists.txt
+++ b/Utilities/cmtar/CMakeLists.txt
@@ -69,6 +69,7 @@ FOREACH(file
"inttypes.h"
"libgen.h"
"memory.h"
+ "sys/mkdev.h"
"stdint.h"
"stdlib.h"
"stdio.h"
diff --git a/Utilities/cmtar/config.h.in b/Utilities/cmtar/config.h.in
index eba0ed3..b22bfac 100644
--- a/Utilities/cmtar/config.h.in
+++ b/Utilities/cmtar/config.h.in
@@ -54,6 +54,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@
+/* Define to 1 if you have the <sys/mkdev.h> header file. */
+#cmakedefine HAVE_SYS_MKDEV_H @HAVE_SYS_MKDEV_H@
+
/* Define if you have the strdup function */
#cmakedefine HAVE_STRDUP @HAVE_STRDUP@
diff --git a/Utilities/cmtar/extract.c b/Utilities/cmtar/extract.c
index 4314325..506dff1 100644
--- a/Utilities/cmtar/extract.c
+++ b/Utilities/cmtar/extract.c
@@ -34,6 +34,10 @@
# include <unistd.h>
#endif
+#ifdef HAVE_SYS_MKDEV_H
+# include <sys/mkdev.h>
+#endif
+
struct linkname
{
diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c
index 1068959..b0cc2d4 100644
--- a/Utilities/cmtar/libtar.c
+++ b/Utilities/cmtar/libtar.c
@@ -28,6 +28,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
+# include <stdlib.h>
#endif
#ifdef DEBUG