pax: add <sys/sysmacros.h> for Linux

* On Arch Linux, the build failed, makedev(3) indicates
  #include <sys/sysmacros.h>
* On Debian Buster, the build succeed but a big warning is displayed:
    warning: In the GNU C Library, "minor" is defined
    by <sys/sysmacros.h>. For historical compatibility, it is
    currently defined by <sys/types.h> as well, but we plan to
    remove this soon. To use "minor", include <sys/sysmacros.h>
    directly. If you did not intend to use a system-defined macro
    "minor", you should undefine it after including <sys/types.h>.
This commit is contained in:
triaxx 2018-10-29 20:18:02 +00:00
parent eb1dce9bfb
commit c20ba9288e
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.52 2018/04/07 08:57:01 jperkin Exp $
# $NetBSD: Makefile,v 1.53 2018/10/29 20:18:02 triaxx Exp $
DISTNAME= pax-20080110
PKGREVISION= 3
PKGREVISION= 4
CATEGORIES= archivers
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1,4 +1,4 @@
/* $NetBSD: pax.h,v 1.13 2014/03/14 22:16:50 ryoon Exp $ */
/* $NetBSD: pax.h,v 1.14 2018/10/29 20:18:02 triaxx Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -265,7 +265,7 @@ typedef struct oplist {
# define major(x) ((int)(0x00ff & ((x) >> 8)))
# define minor(x) ((int)(0xffff00ff & (x)))
# define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min)))
# elif defined(_SCO_DS)
# elif defined(_SCO_DS) || defined(__linux__)
# include <sys/sysmacros.h>
# endif
# define MAJOR(x) major(x)