[PATCH] discover/device-handler: Include madedev() from sysmacros.h

Samuel Mendoza-Jonas sam at mendozajonas.com
Wed Jun 7 16:32:39 AEST 2017


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 at mendozajonas.com>
---
 discover/device-handler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/discover/device-handler.c b/discover/device-handler.c
index 5b7afd0..ec1eee3 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -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>
-- 
2.13.0



More information about the Petitboot mailing list