All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] [PATCH] include sys/sysmacros.h for major/minor/makedev
@ 2016-04-19  6:16 Mike Frysinger
  2016-04-19  6:34 ` Milan Broz
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2016-04-19  6:16 UTC (permalink / raw)
  To: gmazyland; +Cc: dm-crypt

These functions are defined in that header, so include it when needed.
Otherwise we can get build failures like:
veritysetup-utils_loop.o: In function '_sysfs_backing_file':
utils_loop.c:(.text+0x50): undefined reference to 'minor'
utils_loop.c:(.text+0x5e): undefined reference to 'major'
veritysetup-utils_loop.o: In function 'crypt_loop_device':
utils_loop.c:(.text+0x638): undefined reference to 'major'
../lib/.libs/libcryptsetup.so: undefined reference to 'makedev'
---
 lib/utils_devpath.c | 1 +
 lib/utils_loop.c    | 1 +
 lib/utils_wipe.c    | 1 +
 3 files changed, 3 insertions(+)

diff --git a/lib/utils_devpath.c b/lib/utils_devpath.c
index 963785a..0bc0563 100644
--- a/lib/utils_devpath.c
+++ b/lib/utils_devpath.c
@@ -30,6 +30,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include "internal.h"
 
diff --git a/lib/utils_loop.c b/lib/utils_loop.c
index ff30a27..b392160 100644
--- a/lib/utils_loop.c
+++ b/lib/utils_loop.c
@@ -27,6 +27,7 @@
 #include <limits.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <linux/loop.h>
 
diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c
index 210c566..8e2a2aa 100644
--- a/lib/utils_wipe.c
+++ b/lib/utils_wipe.c
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
+#include <sys/sysmacros.h>
 #include <fcntl.h>
 
 #include "libcryptsetup.h"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-19 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19  6:16 [dm-crypt] [PATCH] include sys/sysmacros.h for major/minor/makedev Mike Frysinger
2016-04-19  6:34 ` Milan Broz
2016-04-19  6:53   ` Mike Frysinger
2016-04-19  9:06     ` Milan Broz
2016-04-19 15:22       ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.