[PATCH] erofs-utils: mkfs: fix uuid.h location

Gao Xiang hsiangkao at aol.com
Wed Dec 9 11:49:37 AEDT 2020


From: Gao Xiang <hsiangkao at aol.com>

As Karel reported [1], "The subdirectory in
    #include <uuid/uuid.h>

is unnecessary (or wrong), if you use
    PKG_CHECK_MODULES([libuuid], [uuid])

than it returns the subdirectory as -I, see

    $ pkg-config --cflags uuid
    -I/usr/include/uuid

so the correct way is
     #include <uuid.h>". Let's fix it now!

[1] https://lore.kernel.org/r/20201208100910.dqqh5cqihewkyetc@ws.net.home

Reported-by: Karel Zak <kzak at redhat.com>
Fixes: e023d47593ff ("erofs-utils: support 128-bit filesystem UUID")
Signed-off-by: Gao Xiang <hsiangkao at aol.com>
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index c63b27491a3f..abd48be0fa4f 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -24,7 +24,7 @@
 #include "erofs/exclude.h"
 
 #ifdef HAVE_LIBUUID
-#include <uuid/uuid.h>
+#include <uuid.h>
 #endif
 
 #define EROFS_SUPER_END (EROFS_SUPER_OFFSET + sizeof(struct erofs_super_block))
-- 
2.24.0



More information about the Linux-erofs mailing list