Skip to content

Commit 7d77ab2

Browse files
tdmcyngnSteve Kondik
authored and
Steve Kondik
committed
ext4_utils: Fix warning when compiling C++ code
* Fixes "#warning: macro min is incompatible with C++. #undefing min" Change-Id: I2d7a0fd6c7babd0abd5e4c0ece55432f9ea37e95
1 parent 6e6e959 commit 7d77ab2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext4_utils/ext4_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ extern int force;
5757

5858
#define EXT4_JNL_BACKUP_BLOCKS 1
5959

60+
#ifndef __cplusplus
6061
#ifndef min /* already defined by windows.h */
6162
#define min(a, b) ((a) < (b) ? (a) : (b))
6263
#endif
64+
#endif
6365

6466
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y))
6567
#define EXT4_ALIGN(x, y) ((y) * DIV_ROUND_UP((x), (y)))

0 commit comments

Comments
 (0)