Skip to content

wc_port: guard stddef header include.#10280

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:no_stddef_h_guard
Apr 24, 2026
Merged

wc_port: guard stddef header include.#10280
douzzer merged 1 commit intowolfSSL:masterfrom
philljj:no_stddef_h_guard

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Apr 22, 2026

Description

Guard #include <stddef.h> behind #ifndef NO_STDDEF_H.

stddef header is not appropriate for FreeBSD kernel builds.

This is similar to existing pattern for NO_STRING_H, NO_STDLIB_H, etc.

@philljj philljj self-assigned this Apr 22, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 20:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates wolfCrypt’s portability headers to avoid including the userland stddef.h header in FreeBSD kernel module builds by introducing a NO_STDDEF_H guard, matching the existing NO_*_H patterns used for kernel-mode configurations.

Changes:

  • Guard #include <stddef.h> in wc_port.h behind #ifndef NO_STDDEF_H.
  • Define NO_STDDEF_H for WOLFSSL_BSDKM (FreeBSD kernel module) builds in settings.h.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
wolfssl/wolfcrypt/wc_port.h Adds NO_STDDEF_H guard around stddef.h include used for size_t in wolfSSL_strnstr declaration.
wolfssl/wolfcrypt/settings.h Defines NO_STDDEF_H in the WOLFSSL_BSDKM configuration block to disable userland stddef.h in FreeBSD kernel builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Apr 22, 2026

Retest this please.

(something with ocsp responder test in generic config test).

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Apr 23, 2026
@douzzer douzzer merged commit 134f63a into wolfSSL:master Apr 24, 2026
457 of 458 checks passed
@philljj philljj deleted the no_stddef_h_guard branch April 24, 2026 17:59
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.

4 participants