]> git.ozlabs.org Git - petitboot/commitdiff
discover/device-handler: Include makedev() from sysmacros.h
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Thu, 27 Apr 2017 05:35:45 +0000 (15:35 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 20 Jun 2017 04:19:53 +0000 (14:19 +1000)
Include sys/sysmacros.h explicitly in response to the following error
message:

../discover/device-handler.c:1001:13: warning: 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>.
  id = makedev(1, handler->n_ramdisks);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/device-handler.c

index 5b7afd0d3f56d7be992d3725f757d80d2c2c412a..ec1eee344802a24e3c9f4febdd69d1c6f6fdc6c4 100644 (file)
@@ -19,6 +19,7 @@
 #include <url/url.h>
 #include <i18n/i18n.h>
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>