!28 fix build failure due to gcc and ndctl updated

From: @wang--ge 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-01-11 07:52:16 +00:00 committed by Gitee
commit 64fc9fc9fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 72 additions and 3 deletions

View File

@ -0,0 +1,39 @@
From c1cc1b83e4b676c7d7eee0e39ccbfaa1501419fb Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Wed, 11 Jan 2023 14:49:22 +0800
Subject: [PATCH] change daxctl include
---
src/common/os_dimm_ndctl.c | 2 +-
src/tools/daxio/daxio.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/os_dimm_ndctl.c b/src/common/os_dimm_ndctl.c
index b528fb9..b8b9c33 100644
--- a/src/common/os_dimm_ndctl.c
+++ b/src/common/os_dimm_ndctl.c
@@ -42,7 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ndctl/libndctl.h>
-#include <ndctl/libdaxctl.h>
+#include <daxctl/libdaxctl.h>
/* XXX: workaround for missing PAGE_SIZE - should be fixed in linux/ndctl.h */
#include <sys/user.h>
diff --git a/src/tools/daxio/daxio.c b/src/tools/daxio/daxio.c
index 0d6f62f..0ab9029 100644
--- a/src/tools/daxio/daxio.c
+++ b/src/tools/daxio/daxio.c
@@ -49,7 +49,7 @@
#include <string.h>
#include <ndctl/libndctl.h>
-#include <ndctl/libdaxctl.h>
+#include <daxctl/libdaxctl.h>
#include <libpmem.h>
#include "util.h"
--
2.27.0

View File

@ -0,0 +1,25 @@
From e28d3fee51840ae6f8bca4d31c35442ff7b0ff9b Mon Sep 17 00:00:00 2001
From: Grzegorz Brzezinski <grzegorz.brzezinski@intel.com>
Date: Wed, 8 May 2019 13:42:08 +0200
Subject: [PATCH] jemalloc: fix build with gcc-9.1
---
src/jemalloc/src/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/jemalloc/src/util.c b/src/jemalloc/src/util.c
index 33331af..ad8fc2a 100644
--- a/src/jemalloc/src/util.c
+++ b/src/jemalloc/src/util.c
@@ -344,7 +344,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
} \
} while (0)
#define GET_ARG_NUMERIC(val, len) do { \
- switch (len) { \
+ switch ((int)len) { \
case '?': \
val = va_arg(ap, int); \
break; \
--
2.27.0

View File

@ -7,8 +7,8 @@
Name: nvml
Summary: Persistent Memory Development Kit (formerly NVML)
Version: 1.4.2
Release: 6
License: BSD
Release: 7
License: BSD-3-Clause
URL: http://pmem.io/pmdk
Source0: https://github.com/pmem/%{name}/archive/%{upstreamversion}.tar.gz#/%{name}-%{upstreamversion}.tar.gz
@ -91,6 +91,8 @@ Provides: librpmem-debug = %{version}-%{release}
Patch0000: fix-build-error.patch
Patch0001: delete-extra-tests.patch
Patch0002: Initialize-child_idx.patch
Patch0003: fix-build-with-gcc-9.patch
Patch0004: change-daxctl-include.patch
%description
The Persistent Memory Development Kit (PMDK), formerly known as NVML, is
@ -108,7 +110,7 @@ memory as memory-mapped files
CFLAGS="%{optflags}" \
LDFLAGS="%{?__global_ldflags}" \
make %{?_smp_mflags} NORPATH=1
make -j1 NORPATH=1
%install
make install DESTDIR=%{buildroot} \
@ -248,6 +250,9 @@ echo "PMEM_FS_DIR_FORCE_PMEM=1" >> src/test/testconfig.sh
%endif
%changelog
* Wed Jan 11 2023 Ge Wang<wangge20@h-partners.com> - 1.4.2-7
- fix build failure
* Wed Jul 21 2021 wangyue<wangyue92@huawei.com> - 1.4.2-6
- Remove gdb from Buildrequires