OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d392dd
)
ext4_utils: Fix warning when compiling C++ code
author
Tom Marshall
<tdm@cyngn.com>
Mon, 14 Dec 2015 19:20:47 +0000
(11:20 -0800)
committer
Michael Bestas
<mikeioannina@gmail.com>
Sun, 1 Jan 2017 23:30:04 +0000
(
01:30
+0200)
* Fixes "#warning: macro min is incompatible with C++. #undefing min"
Change-Id: I2d7a0fd6c7babd0abd5e4c0ece55432f9ea37e95
ext4_utils/ext4_utils.h
patch
|
blob
|
history
diff --git
a/ext4_utils/ext4_utils.h
b/ext4_utils/ext4_utils.h
index
188976f
..
c493705
100644
(file)
--- a/
ext4_utils/ext4_utils.h
+++ b/
ext4_utils/ext4_utils.h
@@
-57,9
+57,11
@@
extern int force;
#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)))