From faf18b7f9afc76bc55ccd87c843922ee3d6e5df2 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Wed, 23 Oct 2002 20:18:27 +0000 Subject: [PATCH] Added Author: comment, #ifdef'ed linux specific stuff, added typecast for strlen --- src/arch/unix/netif/sio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/arch/unix/netif/sio.c b/src/arch/unix/netif/sio.c index e9fb2c48..6375d073 100644 --- a/src/arch/unix/netif/sio.c +++ b/src/arch/unix/netif/sio.c @@ -1,3 +1,5 @@ +/* Author: Magnus Ivarsson */ + #include "netif/sio.h" #include "netif/fifo.h" #include "lwip/debug.h" @@ -22,6 +24,7 @@ #include #include #include +#include #include #include @@ -108,7 +111,9 @@ static int sio_init( char * device, int devnum, sio_status_t * siostat ) } saio.sa_flags = 0; +#if linux saio.sa_restorer = NULL; +#endif /* linux */ sigaction( SIGIO,&saio,NULL ); /* allow the process to receive SIGIO */ @@ -180,7 +185,7 @@ void sio_send( u8_t c, sio_status_t * siostat ) void sio_send_string( u8_t *str, sio_status_t * siostat ) { // sio_status_t * siostat = ((siostruct_t*)netif->state)->sio; - int len = strlen( str ); + int len = strlen( (const char *)str ); if ( write( siostat->fd, str, len ) <= 0 ) {