diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt index 1a5b35f6a..48a3efa29 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 eba0ed358..b22bfac97 100644 --- a/Utilities/cmtar/config.h.in +++ b/Utilities/cmtar/config.h.in @@ -54,6 +54,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ +/* Define to 1 if you have the 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 431432598..506dff164 100644 --- a/Utilities/cmtar/extract.c +++ b/Utilities/cmtar/extract.c @@ -34,6 +34,10 @@ # include #endif +#ifdef HAVE_SYS_MKDEV_H +# include +#endif + struct linkname { diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index 106895981..b0cc2d468 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -28,6 +28,7 @@ #ifdef HAVE_UNISTD_H # include +# include #endif #ifdef DEBUG