All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call
@ 2015-11-28 13:04 Tom Rini
  2015-11-28 13:04 ` [U-Boot] [PATCH 2/4] fsl_*_serdes.c: Modify memset call in serdes_init Tom Rini
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Tom Rini @ 2015-11-28 13:04 UTC (permalink / raw)
  To: u-boot

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>
---
 arch/sandbox/cpu/eth-raw-os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
index b76a731..5df01ba 100644
--- a/arch/sandbox/cpu/eth-raw-os.c
+++ b/arch/sandbox/cpu/eth-raw-os.c
@@ -194,7 +194,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));
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-01-15 13:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-28 13:04 [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call Tom Rini
2015-11-28 13:04 ` [U-Boot] [PATCH 2/4] fsl_*_serdes.c: Modify memset call in serdes_init Tom Rini
2015-11-29  9:34   ` Bin Meng
2015-12-15  0:51   ` York Sun
2015-11-28 13:04 ` [U-Boot] [PATCH 3/4] qbman_portal.c: Update BUG_ON() call in qbman_swp_mc_submit Tom Rini
2015-11-29  9:34   ` Bin Meng
2015-12-15  0:52   ` York Sun
2015-11-28 13:04 ` [U-Boot] [PATCH 4/4] arch/arm/cpu/arm920t/ep93xx/led.c: Mark inline functions as static inline Tom Rini
2015-11-29  9:34   ` Bin Meng
2015-12-06 22:07   ` [U-Boot] [U-Boot, " Tom Rini
2015-11-29  9:34 ` [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call Bin Meng
2015-11-30 22:13 ` Joe Hershberger
2016-01-15  3:45   ` Bin Meng
2016-01-15 12:28     ` Tom Rini
2016-01-15 13:10 ` [U-Boot] [U-Boot,1/4] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.