summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdgar Grimberg <edgar.grimberg@zylin.com>2010-06-21 23:02:41 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-22 08:24:19 +0200
commitbef497aeb069314cae3a13dd339a181a3ecf67cd (patch)
tree99c8a9380665813aa78b1105e8c5c088cd94cb91 /src
parentfe1f7f63b628ae485609500b8710bfea3bac61a6 (diff)
downloadopenocd+libswd-bef497aeb069314cae3a13dd339a181a3ecf67cd.tar.gz
openocd+libswd-bef497aeb069314cae3a13dd339a181a3ecf67cd.tar.bz2
openocd+libswd-bef497aeb069314cae3a13dd339a181a3ecf67cd.tar.xz
openocd+libswd-bef497aeb069314cae3a13dd339a181a3ecf67cd.zip
flash: fix shadow issues on Mac
Wait is declared in /usr/include/sys/wait.h Signed-off-by: Edgar Grimberg <edgar.grimberg@zylin.com>
Diffstat (limited to 'src')
-rw-r--r--src/flash/mflash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 90e9888b..43721280 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -209,7 +209,7 @@ static int mg_init_gpio (void)
return ret;
}
-static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
+static int mg_dsk_wait(mg_io_type_wait wait_local, uint32_t time_var)
{
uint8_t status, error;
struct target *target = mflash_bank->target;
@@ -228,10 +228,10 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
if (status & mg_io_rbit_status_busy)
{
- if (wait == mg_io_wait_bsy)
+ if (wait_local == mg_io_wait_bsy)
return ERROR_OK;
} else {
- switch (wait)
+ switch (wait_local)
{
case mg_io_wait_not_bsy:
return ERROR_OK;
@@ -259,7 +259,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time_var)
return ERROR_MG_IO;
}
- switch (wait)
+ switch (wait_local)
{
case mg_io_wait_rdy:
if (status & mg_io_rbit_status_ready)