forked from pool/s390-tools
a7f8ed0265
Lots of features implemented for SLES15 SP1. OBS-URL: https://build.opensuse.org/request/show/648783 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=57
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
Subject: zpcictl: include sys/sysmacros.h to avoid minor/major glibc warnings
|
||
From: Jan Hoeppner <jan.hoeppner@de.ibm.com>
|
||
|
||
Summary: zpcictl: Add tool to manage PCI devices
|
||
Description: Use the zpcictl tool to manage PCI devices on the IBM Z
|
||
platform. Initial functions include generating firmware
|
||
error logs, resetting PCI devices, and preparing a device
|
||
for further repair actions.
|
||
Upstream-ID: f35c5d01fd04ecf019f31c58edc0c5165ad276ad
|
||
Problem-ID: RAS1703
|
||
|
||
Upstream-Description:
|
||
|
||
zpcictl: include sys/sysmacros.h to avoid minor/major glibc warnings
|
||
|
||
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 <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 "major", include <sys/sysmacros.h>
|
||
directly. If you did not intend to use a system-defined macro
|
||
"major", you should undefine it after including <sys/types.h>.
|
||
major = major(dev_stat.st_rdev);
|
||
^~~~~~~~~~~~~~~~~~~~~
|
||
|
||
Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
|
||
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
|
||
|
||
|
||
Signed-off-by: Jan Hoeppner <jan.hoeppner@de.ibm.com>
|
||
---
|
||
zpcictl/zpcictl.c | 1 +
|
||
1 file changed, 1 insertion(+)
|
||
|
||
--- a/zpcictl/zpcictl.c
|
||
+++ b/zpcictl/zpcictl.c
|
||
@@ -10,6 +10,7 @@
|
||
#include <errno.h>
|
||
#include <fcntl.h>
|
||
#include <sys/stat.h>
|
||
+#include <sys/sysmacros.h>
|
||
#include <time.h>
|
||
|
||
#include "lib/util_base.h"
|