From: Dmitry V. Levin Date: Fri, 26 Aug 2016 21:32:53 +0000 (+0000) Subject: Do not use AC_HEADER_MAJOR, include unconditionally X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50608a4098dee3799791761dcba4d4453f95e8d2;p=strace Do not use AC_HEADER_MAJOR, include unconditionally glibc, starting with commit glibc-2.24-28-gdbab657, has deprecated inclusion of by . The method used for deprecation breaks AC_HEADER_MAJOR: this autoconf macro no longer defines MAJOR_IN_SYSMACROS, which consequently breaks build. Let's assume that all systems supported by strace provide major, minor, and makedev macros via . * configure.ac (AC_HEADER_MAJOR): Remove. * mknod.c [MAJOR_IN_SYSMACROS, MAJOR_IN_MKDEV]: Remove. Include unconditionally. * print_struct_stat.c: Likewise. * tests/mknod.c: Likewise. * tests/mknodat.c: Likewise. * tests/xstatx.c: Likewise. --- diff --git a/configure.ac b/configure.ac index 110b6373..3b481e12 100644 --- a/configure.ac +++ b/configure.ac @@ -284,7 +284,6 @@ AC_TYPE_SIGNAL AC_TYPE_UID_T AC_HEADER_DIRENT -AC_HEADER_MAJOR AC_HEADER_STAT AC_HEADER_STDBOOL AC_HEADER_STDC diff --git a/mknod.c b/mknod.c index dbcffd7f..9b903116 100644 --- a/mknod.c +++ b/mknod.c @@ -35,14 +35,7 @@ #include #include - -#ifdef MAJOR_IN_SYSMACROS -# include -#endif - -#ifdef MAJOR_IN_MKDEV -# include -#endif +#include static void decode_mknod(struct tcb *tcp, int offset) diff --git a/print_struct_stat.c b/print_struct_stat.c index fd902dc6..7b23ec8a 100644 --- a/print_struct_stat.c +++ b/print_struct_stat.c @@ -34,12 +34,8 @@ #include "defs.h" #include +#include #include "stat.h" -#if defined MAJOR_IN_SYSMACROS -# include -#elif defined MAJOR_IN_MKDEV -# include -#endif void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st) diff --git a/tests/mknod.c b/tests/mknod.c index 98712e19..2d428743 100644 --- a/tests/mknod.c +++ b/tests/mknod.c @@ -5,15 +5,9 @@ # include # include +# include # include -# ifdef MAJOR_IN_SYSMACROS -# include -# endif -# ifdef MAJOR_IN_MKDEV -# include -# endif - static const char sample[] = "mknod"; static long diff --git a/tests/mknodat.c b/tests/mknodat.c index a50e8132..614513e8 100644 --- a/tests/mknodat.c +++ b/tests/mknodat.c @@ -5,15 +5,9 @@ # include # include +# include # include -# ifdef MAJOR_IN_SYSMACROS -# include -# endif -# ifdef MAJOR_IN_MKDEV -# include -# endif - static const char sample[] = "mknodat_sample"; static const long int fd = (long int) 0xdeadbeefffffffff; diff --git a/tests/xstatx.c b/tests/xstatx.c index 48b36873..359ee1db 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -44,14 +44,7 @@ # include # include # include - -# if defined MAJOR_IN_SYSMACROS -# include -# elif defined MAJOR_IN_MKDEV -# include -# else -# include -# endif +# include static void print_time(const time_t t)