diff options
author | CoprDistGit <infra@openeuler.org> | 2023-09-25 02:28:09 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-09-25 02:28:09 +0000 |
commit | f3ecda9124b73d07936b9894fed68a58e2bef695 (patch) | |
tree | e40517019ee1d786180450a9dcc9935d828f2843 /Structures-and-macros-use-the-default-definition-of-.patch | |
parent | d1286f771edf8cf46ba78e812e7059a2879f3581 (diff) |
automatic import of libgmemopeneuler23.03
Diffstat (limited to 'Structures-and-macros-use-the-default-definition-of-.patch')
-rw-r--r-- | Structures-and-macros-use-the-default-definition-of-.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Structures-and-macros-use-the-default-definition-of-.patch b/Structures-and-macros-use-the-default-definition-of-.patch new file mode 100644 index 0000000..962dc9d --- /dev/null +++ b/Structures-and-macros-use-the-default-definition-of-.patch @@ -0,0 +1,67 @@ +From 512d8df361f3afa3831fff90cdf3c3f43bbc9142 Mon Sep 17 00:00:00 2001 +From: Yang Yanchao <yangyanchao6@huawei.com> +Date: Tue, 12 Sep 2023 10:54:05 +0800 +Subject: [PATCH] Structures and macros use the default definition of the + kernel + +Signed-off-by: Yang Yanchao <yangyanchao6@huawei.com> +--- + include/libgmem.h | 29 ----------------------------- + src/libgmem.c | 1 + + 2 files changed, 1 insertion(+), 29 deletions(-) + +diff --git a/include/libgmem.h b/include/libgmem.h +index ece13a3..35cf463 100644 +--- a/include/libgmem.h ++++ b/include/libgmem.h +@@ -17,35 +17,6 @@ + #include <syscall.h> + + __BEGIN_DECLS +-/* +- * TODO: Remove these "ifndef" after kernel upgrade +- */ +-#include <sys/ioctl.h> +-struct hmadvise_arg { +- int hnid; +- unsigned long start; +- size_t len_in; +- int behavior; +-}; +-struct gmem_hnid_arg { +- int *hnuma_id; +-}; +-#ifndef GMEM_GET_HNUMA_ID +- #define GMEM_GET_HNUMA_ID _IOW(0x55, 1, struct gmem_hnid_arg) +-#endif +- +-#ifndef GMEM_MADVISE +- #define GMEM_MADVISE _IOW(0x55, 2, struct hmadvise_arg) +-#endif +- +-#ifndef MADV_PREFETCH +-# define MADV_PREFETCH 32 +-#endif +- +-#ifndef MADV_DONTNEED +-# define MADV_DONTNEED 4 +-#endif +- + /* + * gmemFreeEager - unmap memory data + * @args +diff --git a/src/libgmem.c b/src/libgmem.c +index 59682af..870da87 100644 +--- a/src/libgmem.c ++++ b/src/libgmem.c +@@ -14,6 +14,7 @@ + #include <linux/mman.h> + #include <stdio.h> + #include <stdlib.h> ++#include <sys/ioctl.h> + + #include <libgmem.h> + #include <gmem_common.h> +-- +2.41.0.windows.3 + |