discover/device-handler: Include madedev() from sysmacros.h
diff mbox

Message ID 20170607063241.11497-1-sam@mendozajonas.com
State Accepted
Headers show

Commit Message

Samuel Mendoza-Jonas June 7, 2017, 6:32 a.m. UTC
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 | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox

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>