anchao opened a new pull request, #1309:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1309

   
   ## Summary
   
   netutils/dhcp: fix build warning/break of dhcp6c
   
   ```
   dhcp6c.c:222:3: error: unknown type name ‘pthread_t’
     222 |   pthread_t thread;
         |   ^~~~~~~~~
   dhcp6c.c: In function ‘dhcp6c_get_result’:
   dhcp6c.c:415:7: warning: implicit declaration of function 
‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration]
     415 |       netlib_prefix2ipv6netmask(presult->pl, &presult->netmask);
         |       ^~~~~~~~~~~~~~~~~~~~~~~~~
   dhcp6c.c: In function ‘dhcp6c_parse_ia’:
   dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable]
    1046 |   FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s 
*)handle;
         |                              ^~~~~~~
   dhcp6c.c: In function ‘dhcp6c_precise_open’:
   dhcp6c.c:1702:3: warning: missing braces around initializer 
[-Wmissing-braces]
    1702 |   {
         |   ^
   ......
    1706 |     {0},
         |      -
         |      {{0}}
   dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this 
function); did you mean ‘SO_BINDTODEVICE’?
    1796 |   setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname,
         |                                           ^~~~~~~~~~~~~~~~
         |                                           SO_BINDTODEVICE
   dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for 
each function it appears in
   dhcp6c.c: In function ‘dhcp6c_request_async’:
   dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; 
did you mean ‘timer_create’? [-Wimplicit-function-declaration]
    1886 |   ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c);
         |         ^~~~~~~~~~~~~~
         |         timer_create
   ```
   
   Signed-off-by: chao an <anc...@xiaomi.com>
   
   
   ## Impact
   
   N/A
   
   ## Testing
   
   enable CONFIG_NETUTILS_DHCP6C


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to