Skip to content

[BUG] loopbackNetworkInterface.c lacks of FreeRTOS_ARP.h include #1289

@Nikolay-Po

Description

@Nikolay-Po

Bug
There is compilation error in some circumstances.
In loopbackNetworkInterface.c, at the line 153 the function vARPRefreshCacheEntry() is called. This function belongs to FreeRTOS_ARP.c source and is declared in FreeRTOS_ARP.h
Compilation error is occurring when TCP/IP configuration allows IPv4 and loopback interface usage:

../FreeRTOS/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/loopback/loopbackNetworkInterface.c: In function ‘prvLoopback_Output’:
../FreeRTOS/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/loopback/loopbackNetworkInterface.c:153:21: error: implicit declaration of function ‘vARPRefreshCacheEntry’ [-Wimplicit-function-declaration]
  153 |                     vARPRefreshCacheEntry( pxMACAddress, pxDescriptor->xIPAddress.ulIP_IPv4, pxDescriptor->pxEndPoint );
      |                     ^~~~~~~~~~~~~~~~~~~~~

Target

  • I believe the problem may exhibit itself on any target which will use IPv4 interfaces and when loopback interface is enabled.

Host

  • Host OS: Debian Linux 12

To Reproduce

  • Use project with current TCP stack;
  • Enable IPv4 adressing in FreeRTOSIPConfig.h: #define ipconfigUSE_IPv4 1;
  • Enable loopback interface in FreeRTOSIPConfig.h: #define ipconfigUSE_LOOPBACK 1;
  • Use GCC compiler build from sources after 2023-12-01 (after this GCC commit) with -Wimplicit-function-declaration enabled;
  • Try to build FreeRTOS with TCP/IP support;

Expected behavior
A build without of error is expected

Additional context
Usually I'm using most fresh GCC compiler available. Currently it's GCC 15. Therefore, it treats implicit function declaration as an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions