[PATCH 15/16] hash: add define guards to avoid multi-inclusion
Weiguo Li
liwg06 at foxmail.com
Sun Feb 6 04:58:45 CET 2022
Supplement define guards to prevent multiple inclusion.
Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
---
lib/hash/rte_cmp_arm64.h | 5 +++++
lib/hash/rte_cmp_x86.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h
index e9e26f9abd..aaad614d56 100644
--- a/lib/hash/rte_cmp_arm64.h
+++ b/lib/hash/rte_cmp_arm64.h
@@ -2,6 +2,9 @@
* Copyright(c) 2015 Cavium, Inc
*/
+#ifndef _RTE_CMP_ARM64_H_
+#define _RTE_CMP_ARM64_H_
+
/* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
static int
rte_hash_k16_cmp_eq(const void *key1, const void *key2,
@@ -83,3 +86,5 @@ rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
rte_hash_k64_cmp_eq((const char *) key1 + 64,
(const char *) key2 + 64, key_len);
}
+
+#endif /* _RTE_CMP_ARM64_H_ */
diff --git a/lib/hash/rte_cmp_x86.h b/lib/hash/rte_cmp_x86.h
index 13a5836351..f31ec7b1d2 100644
--- a/lib/hash/rte_cmp_x86.h
+++ b/lib/hash/rte_cmp_x86.h
@@ -2,6 +2,9 @@
* Copyright(c) 2015 Intel Corporation
*/
+#ifndef _RTE_CMP_X86_H_
+#define _RTE_CMP_X86_H_
+
#include <rte_vect.h>
/* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
@@ -74,3 +77,5 @@ rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
rte_hash_k64_cmp_eq((const char *) key1 + 64,
(const char *) key2 + 64, key_len);
}
+
+#endif /* _RTE_CMP_X86_H_ */
--
2.25.1
More information about the dev
mailing list