diff mbox series

[3/5] table: rename local variable for Windows compatibility

Message ID 20210915214052.143098-4-dmitry.kozliuk@gmail.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series lib: Windows compatibility renaming | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk Sept. 15, 2021, 9:40 p.m. UTC
Windows SDK headers define `min` macro which breaks the definition
of `min` variable in `f_lru_pos()` inline function. Rename the variable
to allow inclusion of both DPDK and Windows headers in the same file.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/table/rte_lru_x86.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/table/rte_lru_x86.h b/lib/table/rte_lru_x86.h
index 38476d956e..b4f54113df 100644
--- a/lib/table/rte_lru_x86.h
+++ b/lib/table/rte_lru_x86.h
@@ -79,8 +79,8 @@  static inline int
 f_lru_pos(uint64_t lru_list)
 {
 	__m128i lst = _mm_set_epi64x((uint64_t)-1, lru_list);
-	__m128i min = _mm_minpos_epu16(lst);
-	return _mm_extract_epi16(min, 1);
+	__m128i minimum = _mm_minpos_epu16(lst);
+	return _mm_extract_epi16(minimum, 1);
 }
 #define lru_pos(bucket) f_lru_pos(bucket->lru_list)