sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 99c787631013bacf71c27dcac16d5a55b82be1c2
parent 48d04ae446b39c0e230ec4e8c38d25865fb662db
Author: David Phillips <david@sighup.nz>
Date:   Mon,  2 Jul 2018 19:42:41 +1200

On glibc, include sysmacros.h directly

On glibc, major, minor, and makedev are all defined in
sys/sysmacros.h with types.h only including this for historical
reasons. A future release of glibc will remove this behaviour,
meaning that major, minor, and makedev will no longer be defined
for us without including sysmacros.h.

Diffstat:
Mls.c | 3+++
Mtar.c | 4++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ls.c b/ls.c @@ -1,6 +1,9 @@ /* See LICENSE file for copyright and license details. */ #include <sys/stat.h> #include <sys/types.h> +#ifdef __GLIBC__ +#include <sys/sysmacros.h> +#endif #include <dirent.h> #include <grp.h> diff --git a/tar.c b/tar.c @@ -1,6 +1,10 @@ /* See LICENSE file for copyright and license details. */ #include <sys/stat.h> #include <sys/time.h> +#include <sys/types.h> +#ifdef __GLIBC__ +#include <sys/sysmacros.h> +#endif #include <errno.h> #include <fcntl.h>