Commit 9a5ff1a0 authored by Adrian Reber's avatar Adrian Reber Committed by Pavel Emelyanov

zdtm: fix '"makedev" is defined by <sys/sysmacros.h>'

Compiling zdtm on the latest Fedora rawhide gives errors like this:

ns.c: In function ‘prepare_mntns’:
ns.c:122:13: error: In the GNU C Library, "makedev" 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 "makedev", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "makedev", you should undefine it after including <sys/types.h>. [-Werror]
   if (mknod("/dev/ptmx", 0666 | S_IFCHR, makedev(5, 2)) == 0) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This commit fixes those errors.

travis-ci: success for zdtm: fix '"makedev" is defined by <sys/sysmacros.h>'
Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent aa1d24a7
......@@ -7,7 +7,7 @@
#include <errno.h>
#include <stdbool.h>
#include <sys/mount.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/param.h>
......
......@@ -4,6 +4,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/sysmacros.h>
#include "zdtmtst.h"
......
......@@ -4,6 +4,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/sysmacros.h>
#include "zdtmtst.h"
......
......@@ -4,7 +4,7 @@ const char *test_doc = "static test for packet sockets mmaps";
const char *test_author = "Pavel Emelyanov <xemul@parallels.com>";
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
#include "zdtmtst.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment