Skip to content

Commit

Permalink
discover/device-handler: Include makedev() from sysmacros.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sammj committed Jun 20, 2017
1 parent 41ed6ff commit 18158dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions discover/device-handler.c
Expand Up @@ -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>
Expand Down

0 comments on commit 18158dc

Please sign in to comment.