diff mbox

[07/11] device-discovery.c: removed a warning

Message ID 20170721163806.15803-8-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson July 21, 2017, 4:38 p.m. UTC
device-discovery.c:171: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>.
  } else if (dm_is_dm_major(major(dev)))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/blkmapd/device-discovery.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
index c66669d..29bafb2 100644
--- a/utils/blkmapd/device-discovery.c
+++ b/utils/blkmapd/device-discovery.c
@@ -26,6 +26,7 @@ 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>