From f35c5d01fd04ecf019f31c58edc0c5165ad276ad Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Tue, 2 Oct 2018 08:23:07 +0100 Subject: [PATCH] zpcictl: include sys/sysmacros.h to avoid minor/major glibc warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The minor()/major() function definitions are moved to sys/sysmacros.h and will be removed from sys/types.h. To correct below warning, simply include sys/sysmacros.h. zpcictl.c: In function ‘sysfs_get_slot_addr’: zpcictl.c:184:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. If you did not intend to use a system-defined macro "major", you should undefine it after including . major = major(dev_stat.st_rdev); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hendrik Brueckner Signed-off-by: Stefan Haberland --- zpcictl/zpcictl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zpcictl/zpcictl.c b/zpcictl/zpcictl.c index 91a5f824..5f63b179 100644 --- a/zpcictl/zpcictl.c +++ b/zpcictl/zpcictl.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "lib/util_base.h"