Do not add macro min() definition for C++
It will have build error when the caller also includes <algorithm> in C++:
external/libcxx/include/__undef_min_max: macro min is incompatible with C++
Bug: 34336098
Test: builds
Change-Id: I984a24a8dfce6da5a1ad52594ef94ed97c67e9b8
diff --git a/ext4_utils/include/ext4_utils/ext4_utils.h b/ext4_utils/include/ext4_utils/ext4_utils.h
index 0fbbdd3..75c72bb 100644
--- a/ext4_utils/include/ext4_utils/ext4_utils.h
+++ b/ext4_utils/include/ext4_utils/ext4_utils.h
@@ -57,9 +57,11 @@
#define EXT4_JNL_BACKUP_BLOCKS 1
+#ifndef __cplusplus
#ifndef min /* already defined by windows.h */
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
+#endif
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y))
#define EXT4_ALIGN(x, y) ((y) * DIV_ROUND_UP((x), (y)))