[PATCH] libmtd: Variable name same as function name causing compile to fail (Android)
Artem Bityutskiy
dedekind1 at gmail.com
Fri Jan 13 16:59:32 EST 2012
On Mon, 2012-01-09 at 16:20 +0000, Thomas Cannon wrote:
> When compiling mtd-utils against Android's bionic libc using the
> supplied cross compiler environment it errors:
>
> lib/libmtd.c: In function 'dev_node2num':
> lib/libmtd.c:444: error: called object 'major' is not a function
> lib/libmtd.c:445: error: called object 'minor' is not a function
> lib/libmtd.c: In function 'mtd_probe_node':
> lib/libmtd.c:1384: error: called object 'major' is not a function
> lib/libmtd.c:1385: error: called object 'minor' is not a function
>
> This patch updates the variable names for "major" and "minor" in two
> places. It then compiles cleanly.
I've tweaked the patch a bit and picked different names: mjr and mnr
instead of strange majorx and minorx. I've also re-named major1 and
minor1 variables for consistency.
Pushed to mtd-utils.git, thanks!
Artem.
More information about the linux-mtd
mailing list