]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
krbd: include sys/sysmacros.h for major, minor and makedev 20773/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 7 Mar 2018 10:32:02 +0000 (11:32 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 7 Mar 2018 10:42:38 +0000 (11:42 +0100)
Previously we got these through sys/types.h, but that's now deprecated:

  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>.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/krbd.cc

index cdc45e7dddcfde0681e5e118c7f9aee08a81c915..27b33b2855ae32882cd2f00cb0863fb3fe621bbb 100644 (file)
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <string>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <unistd.h>