Skip to content

Fix GCC 14 build error: add hostapd_deinit_driver declaration#114

Merged
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:fix/gcc14-implicit-declaration
Apr 3, 2026
Merged

Fix GCC 14 build error: add hostapd_deinit_driver declaration#114
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:fix/gcc14-implicit-declaration

Conversation

@yxieca
Copy link
Copy Markdown
Contributor

@yxieca yxieca commented Apr 3, 2026

Description

Fix build failure with GCC 14 (Debian trixie) where implicit function declarations are treated as errors.

Fixes #113

Root Cause

hostapd_deinit_driver() is defined in src/ap/hostapd.c (non-static under CONFIG_SONIC_HOSTAPD) but has no prototype in any header. GCC 14 errors on this:

main.c:404:9: error: implicit declaration of function 'hostapd_deinit_driver'

Changes

  • src/ap/hostapd.h: Add function prototype under #ifdef CONFIG_SONIC_HOSTAPD

Testing

  • Verified the function signature matches the definition in hostapd.c
  • This is a header-only change adding a missing declaration

Impact

Blocks the docker-macsec trixie upgrade tracked in sonic-net/SONiC#2169

…apd.h

GCC 14 (Debian trixie) treats implicit function declarations as errors.
hostapd_deinit_driver() is called in hostapd/main.c but was not declared
in any header. Add the prototype to src/ap/hostapd.h under
CONFIG_SONIC_HOSTAPD guard.

This fixes the build failure blocking the docker-macsec trixie upgrade
(sonic-net/SONiC#2169).

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit 214f63f into sonic-net:master Apr 3, 2026
10 checks passed
@yxieca yxieca deleted the fix/gcc14-implicit-declaration branch April 3, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure with GCC 14 (trixie): implicit declaration of hostapd_deinit_driver

3 participants