summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-11-28 08:04:40 -0500
committerTom Rini <trini@konsulko.com>2016-01-15 08:09:47 -0500
commit71229098a61c0b8c5abe24c4a644234e1679bca3 (patch)
tree36edcb70df11ddc1f061356afb4c013fdb323c22 /arch/sandbox
parentaf7a55514a03788c23fd2ea5c9364195f58dc38e (diff)
downloadu-boot-imx-71229098a61c0b8c5abe24c4a644234e1679bca3.zip
u-boot-imx-71229098a61c0b8c5abe24c4a644234e1679bca3.tar.gz
u-boot-imx-71229098a61c0b8c5abe24c4a644234e1679bca3.tar.bz2
eth-raw-os.c: Add cast to bind(2) call
With more recent gcc versions we otherwise get an error like: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in *' and the common solution here is to cast, rather than re-work the code. Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/eth-raw-os.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
index 528865f..ab64f6e 100644
--- a/arch/sandbox/cpu/eth-raw-os.c
+++ b/arch/sandbox/cpu/eth-raw-os.c
@@ -198,7 +198,8 @@ int sandbox_eth_raw_os_send(void *packet, int length,
addr.sin_family = AF_INET;
addr.sin_port = udph->source;
addr.sin_addr.s_addr = iph->saddr;
- retval = bind(priv->local_bind_sd, &addr, sizeof(addr));
+ retval = bind(priv->local_bind_sd, (struct sockaddr *)&addr,
+ sizeof(addr));
if (retval < 0)
printf("Failed to bind: %d %s\n", errno,
strerror(errno));