2424
2525#include <hal/hal_gpio.h>
2626#include <hal/hal_flash.h>
27+ #include <stdint.h>
2728#include <console/console.h>
2829
2930#include <log/log.h>
@@ -120,12 +121,12 @@ static const oc_handler_t omgr_oc_handler = {
120121
121122static void net_test_readable (void * arg , int err )
122123{
123- console_printf ("net_test_readable %x - %d\n" , (int )arg , err );
124+ console_printf ("net_test_readable %lx - %d\n" , (unsigned long )( uintptr_t )arg , err );
124125}
125126
126127static void net_test_writable (void * arg , int err )
127128{
128- console_printf ("net_test_writable %x - %d\n" , (int )arg , err );
129+ console_printf ("net_test_writable %lx - %d\n" , (unsigned long )( uintptr_t )arg , err );
129130}
130131
131132static const union mn_socket_cb net_test_cbs = {
@@ -135,7 +136,8 @@ static const union mn_socket_cb net_test_cbs = {
135136
136137static int net_test_newconn (void * arg , struct mn_socket * new )
137138{
138- console_printf ("net_test_newconn %x - %x\n" , (int )arg , (int )new );
139+ console_printf ("net_test_newconn %lx - %lx\n" , (unsigned long )(uintptr_t )arg ,
140+ (unsigned long )(uintptr_t )new );
139141 mn_socket_set_cbs (new , NULL , & net_test_cbs );
140142 net_test_socket2 = new ;
141143 return 0 ;
@@ -161,12 +163,12 @@ net_cli(int argc, char **argv)
161163 }
162164 if (!strcmp (argv [1 ], "udp" )) {
163165 rc = mn_socket (& net_test_socket , MN_PF_INET , MN_SOCK_DGRAM , 0 );
164- console_printf ("mn_socket(UDP) = %d %x \n" , rc ,
165- (int )net_test_socket );
166+ console_printf ("mn_socket(UDP) = %d %lx \n" , rc ,
167+ (unsigned long )( uintptr_t )net_test_socket );
166168 } else if (!strcmp (argv [1 ], "tcp" )) {
167169 rc = mn_socket (& net_test_socket , MN_PF_INET , MN_SOCK_STREAM , 0 );
168- console_printf ("mn_socket(TCP) = %d %x \n" , rc ,
169- (int )net_test_socket );
170+ console_printf ("mn_socket(TCP) = %d %lx \n" , rc ,
171+ (unsigned long )( uintptr_t )net_test_socket );
170172 } else if (!strcmp (argv [1 ], "connect" ) || !strcmp (argv [1 ], "bind" )) {
171173 char * addrStr = DEFAULT_IPADDR ;
172174 int port = DEFAULT_PORT ;
0 commit comments