buglwIP - A Lightweight TCP/IP stack - Bugs: bug #54617, Compilation errors with LWIP_UDP=0

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #54617: Compilation errors with LWIP_UDP=0

Submitter:  Martine Lenders <authmillenon>
Submitted:  Tue 04 Sep 2018 12:26:18 PM UTC
   
 
Category:  Network drivers Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  git head

Tue 04 Sep 2018 08:13:05 PM UTC, comment #1: 

Pushed, thanks for the patch!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 04 Sep 2018 12:26:18 PM UTC, original submission:  

When trying to compile with UDP deactivated (<pre>#define LWIP_UDP 0</pre> in lwipopts.h; to minimize binary size), I get several compilation errors in current master as well as in STABLE-2_1_0_RC1:


src/netif/zepif.c: In function ‘zepif_linkoutput’:
src/netif/zepif.c:209:11: error: implicit declaration of function ‘udp_sendto’ [-Werror=implicit-function-declaration]
     err = udp_sendto(state->pcb, q, state->init.zep_dst_ip_addr, state->init.zep_dst_udp_port);
           ^
src/netif/zepif.c: In function ‘zepif_init’:
src/netif/zepif.c:252:16: error: implicit declaration of function ‘udp_new_ip_type’ [-Werror=implicit-function-declaration]
   state->pcb = udp_new_ip_type(IPADDR_TYPE_ANY);
                ^
src/netif/zepif.c:252:14: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
   state->pcb = udp_new_ip_type(IPADDR_TYPE_ANY);
              ^
src/netif/zepif.c:257:9: error: implicit declaration of function ‘udp_bind’ [-Werror=implicit-function-declaration]
   err = udp_bind(state->pcb, state->init.zep_src_ip_addr, state->init.zep_src_udp_port);
         ^
src/netif/zepif.c:262:5: error: implicit declaration of function ‘udp_bind_netif’ [-Werror=implicit-function-declaration]
     udp_bind_netif(state->pcb, state->init.zep_netif);
[...]
src/include/lwip/ip.h:219:41: error: dereferencing pointer to incomplete type ‘struct udp_pcb’
 #define ip_set_option(pcb, opt)   ((pcb)->so_options = (u8_t)((pcb)->so_options | (opt)))
                                         ^
src/netif/zepif.c:265:3: note: in expansion of macro ‘ip_set_option’
   ip_set_option(state->pcb, SOF_BROADCAST);
   ^
src/netif/zepif.c:266:3: error: implicit declaration of function ‘udp_recv’ [-Werror=implicit-function-declaration]
   udp_recv(state->pcb, zepif_udp_recv, netif);
   ^
src/netif/zepif.c:294:5: error: implicit declaration of function ‘udp_remove’ [-Werror=implicit-function-declaration]
     udp_remove(state->pcb);
     ^


This should be fixed with the attached patch (I hope this is the right way to submit a patch... :-/).

Martine Lenders <authmillenon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by authmillenon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-04 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.1.0
    2018-09-04 authmillenon Attached File- Added 0001-Make-zepif-dependent-on-LWIP_UDP-config.patch, #44932

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code