[meta-oe,6/6] pmdk: Fix build with newer ndctl

Message ID 20220327011432.555592-6-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/6] rocksdb: Exclude on ppc/musl | expand

Commit Message

Khem Raj March 27, 2022, 1:14 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...axctl.h-instead-of-ndctl-libdaxctl.h.patch | 69 +++++++++++++++++++
 meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb  |  3 +-
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch

Patch

diff --git a/meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch b/meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch
new file mode 100644
index 0000000000..0b03ffdea5
--- /dev/null
+++ b/meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch
@@ -0,0 +1,69 @@ 
+From 932252c0ba54a51c8bcf58b747656e29cdebfa6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Mar 2022 13:06:50 -0700
+Subject: [PATCH] use daxctl/libdaxctl.h instead of ndctl/libdaxctl.h
+
+Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/5413]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libpmem2/badblocks_ndctl.c        | 2 +-
+ src/libpmem2/region_namespace_ndctl.c | 2 +-
+ src/libpmem2/usc_ndctl.c              | 2 +-
+ src/tools/daxio/daxio.c               | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/libpmem2/badblocks_ndctl.c b/src/libpmem2/badblocks_ndctl.c
+index 9a5910bba..cc637f7f4 100644
+--- a/src/libpmem2/badblocks_ndctl.c
++++ b/src/libpmem2/badblocks_ndctl.c
+@@ -16,7 +16,7 @@
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ 
+ #include "libpmem2.h"
+ #include "pmem2_utils.h"
+diff --git a/src/libpmem2/region_namespace_ndctl.c b/src/libpmem2/region_namespace_ndctl.c
+index 1383796a9..e31185984 100644
+--- a/src/libpmem2/region_namespace_ndctl.c
++++ b/src/libpmem2/region_namespace_ndctl.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+ 
+diff --git a/src/libpmem2/usc_ndctl.c b/src/libpmem2/usc_ndctl.c
+index be63e879b..c58032a83 100644
+--- a/src/libpmem2/usc_ndctl.c
++++ b/src/libpmem2/usc_ndctl.c
+@@ -5,7 +5,7 @@
+  * usc_ndctl.c -- pmem2 usc function for platforms using ndctl
+  */
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <sys/types.h>
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+diff --git a/src/tools/daxio/daxio.c b/src/tools/daxio/daxio.c
+index 66cd0b7ae..7f2c89d48 100644
+--- a/src/tools/daxio/daxio.c
++++ b/src/tools/daxio/daxio.c
+@@ -21,7 +21,7 @@
+ #include <string.h>
+ 
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <libpmem.h>
+ 
+ #include "util.h"
+-- 
+2.35.1
+
diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb
index 4354c83371..33d04099c9 100644
--- a/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb
+++ b/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb
@@ -11,7 +11,8 @@  DEPENDS:append:libc-musl = " fts"
 
 S = "${WORKDIR}/git"
 
-SRC_URI = "git://github.com/pmem/pmdk.git;branch=stable-1.11;protocol=https"
+SRC_URI = "git://github.com/pmem/pmdk.git;branch=stable-1.11;protocol=https \
+           file://0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch"
 SRCREV = "5b21904a257eff47f2e87fcbf2de46111f03ddd8"
 
 inherit autotools-brokensep pkgconfig