Skip to contentSkip to conversation

lib: fix include path for uuid.h

PATCH In review Jaegeuk Kim 2 participants 8 messages Jun 15, 2020 – Jun 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 lib: fix include path for uuid.h

From: Rolf Eike Beer <[email protected]>

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

The "uuid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path.

---
 mkfs/f2fs_format.c      | 2 +-
 mkfs/f2fs_format_main.c | 2 +-
 tools/f2fscrypt.c       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
mkfs/f2fs_format.c +1 -1
index 44575e0..4999cac 100644
@@ -18,7 +18,7 @@
 #include <sys/mount.h>
 #endif
 #include <time.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
 
 #include "f2fs_fs.h"
 #include "quota.h"
mkfs/f2fs_format_main.c +1 -1
index 204a410..282c94e 100644
@@ -18,7 +18,7 @@
 #include <sys/mount.h>
 #endif
 #include <time.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
 #include <errno.h>
 
 #include "config.h"
tools/f2fscrypt.c +1 -1
index fe3e0ff..d5bc3c5 100644
@@ -43,7 +43,7 @@
 #ifdef __KERNEL__
 #include <linux/fs.h>
 #endif
-#include <uuid/uuid.h>
+#include <uuid.h>
 
 #if !defined(HAVE_ADD_KEY) || !defined(HAVE_KEYCTL)
 #include <sys/syscall.h>
Signature · 8 lines
2.27.0.290.gba653c62da-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
#1 lore raw

PATCH 2/4 lib: fix include path for blkid.h

From: Rolf Eike Beer <[email protected]>

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

The "blkid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path.

---
 mkfs/f2fs_format_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/f2fs_format_main.c +1 -1
index 282c94e..3d86c44 100644
@@ -23,7 +23,7 @@
 
 #include "config.h"
 #ifdef HAVE_LIBBLKID
-#  include <blkid/blkid.h>
+#  include <blkid.h>
 #endif
 
 #include "f2fs_fs.h"
Signature · 8 lines
2.27.0.290.gba653c62da-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by on v1 2/4
#2 lore raw

Re: [f2fs-dev] [PATCH 2/4] lib: fix include path for blkid.h

Quoted 11 lines · Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

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

The "blkid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path.

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

#3 lore raw

PATCH 3/4 lib: use ${libuuid_LIBS} instead of -luuid everywhere

In reply to Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

Otherwise linking will fail if the library is in an uncommon location or has a non-standard name.

---
 mkfs/Makefile.am  | 2 +-
 tools/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
mkfs/Makefile.am +1 -1
index 83e2389..42c8d31 100644
@@ -12,7 +12,7 @@ lib_LTLIBRARIES = libf2fs_format.la
 libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
 libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD
 libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include
-libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} -luuid -L$(top_builddir)/lib -lf2fs \
+libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \
 	-version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
 
 install-exec-hook:
tools/Makefile.am +1 -1
index 446bb39..56bf2e4 100644
@@ -10,7 +10,7 @@ parse_f2fs_SOURCES = f2fs_io_parse.c
 if LINUX
 sbin_PROGRAMS += f2fscrypt
 f2fscrypt_SOURCES = f2fscrypt.c sha512.c
-f2fscrypt_LDFLAGS = -luuid
+f2fscrypt_LDFLAGS = ${libuuid_LIBS}
 dist_man_MANS = f2fscrypt.8
 endif
 
Signature · 8 lines
2.27.0.290.gba653c62da-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by on v1 3/4
#4 lore raw

Re: [f2fs-dev] [PATCH 3/4] lib: use ${libuuid_LIBS} instead of -luuid everywhere

Quoted 7 lines · Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

Otherwise linking will fail if the library is in an uncommon location or has a non-standard name.

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

#5 lore raw

PATCH 4/4 lib: pass all needed include paths to libf2fs

In reply to Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

Otherwise the paths to uuid and blkid headers extracted from pkg-config are not respected.

---
 mkfs/Makefile.am | 1 -
 1 file changed, 1 deletion(-)
mkfs/Makefile.am +0 -1
index 42c8d31..af5b1c7 100644
@@ -11,7 +11,6 @@ mkfs_f2fs_LDADD = ${libuuid_LIBS} ${libblkid_LIBS} $(top_builddir)/lib/libf2fs.l
 lib_LTLIBRARIES = libf2fs_format.la
 libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
 libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD
-libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include
 libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \
 	-version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
 
Signature · 8 lines
2.27.0.290.gba653c62da-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by on v1 4/4
#6 lore raw

Re: [f2fs-dev] [PATCH 4/4] lib: pass all needed include paths to libf2fs

Quoted 7 lines · Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

Otherwise the paths to uuid and blkid headers extracted from pkg-config are not respected.

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reviewed-by on v1 1/4
#7 lore raw
In reply to Jaegeuk Kim
Quoted 11 lines · Jaegeuk Kim

From: Rolf Eike Beer <[email protected]>

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

The "uuid/" directory is actually part of the include path. This usually still works because most people have the path one level up in their default include path.

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel