diff options
-rw-r--r-- | lib/cpio.c | 8 | ||||
-rw-r--r-- | system.h | 20 |
2 files changed, 8 insertions, 20 deletions
diff --git a/lib/cpio.c b/lib/cpio.c index 9003494b7..e71f7cb7e 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -9,6 +9,14 @@ #include "system.h" +#if MAJOR_IN_MKDEV +#include <sys/mkdev.h> +#elif MAJOR_IN_SYSMACROS +#include <sys/sysmacros.h> +#else +#include <sys/types.h> /* already included from system.h */ +#endif + #include <rpm/rpmio.h> #include <rpm/rpmlog.h> @@ -43,26 +43,6 @@ extern char ** environ; # endif #endif -/* Since major is a function on SVR4, we can't use `ifndef major'. */ -#if MAJOR_IN_MKDEV -#include <sys/mkdev.h> -#define HAVE_MAJOR -#endif -#if MAJOR_IN_SYSMACROS -#include <sys/sysmacros.h> -#define HAVE_MAJOR -#endif -#ifdef major /* Might be defined in sys/types.h. */ -#define HAVE_MAJOR -#endif - -#ifndef HAVE_MAJOR -#define major(dev) (((dev) >> 8) & 0xff) -#define minor(dev) ((dev) & 0xff) -#define makedev(maj, min) (((maj) << 8) | (min)) -#endif -#undef HAVE_MAJOR - #ifdef HAVE_UTIME_H #include <utime.h> #endif |