Skip to content

wc_port: guard fcntl behind WOLFSSL_KERNEL_MODE.#10521

Open
philljj wants to merge 2 commits into
wolfSSL:masterfrom
philljj:kernel_fcntl
Open

wc_port: guard fcntl behind WOLFSSL_KERNEL_MODE.#10521
philljj wants to merge 2 commits into
wolfSSL:masterfrom
philljj:kernel_fcntl

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented May 22, 2026

Description

Guard userspace filesystem code with !defined(WOLFSSL_KERNEL_MODE) instead of !defined(WOLFSSL_LINUXKM).

@philljj philljj self-assigned this May 22, 2026
Copilot AI review requested due to automatic review settings May 22, 2026 19:39
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 the platform guards around the close-on-exec helper APIs so that userspace-only fcntl-based code is excluded for all kernel-mode builds (via WOLFSSL_KERNEL_MODE), not just Linux kernel module builds (WOLFSSL_LINUXKM).

Changes:

  • Switch wc_set_cloexec / wc_*_cloexec declarations in wc_port.h to be gated by !defined(WOLFSSL_KERNEL_MODE).
  • Switch the corresponding fcntl.h include and implementations in wc_port.c to be gated by !defined(WOLFSSL_KERNEL_MODE).

Reviewed changes

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

File Description
wolfssl/wolfcrypt/wc_port.h Updates the userspace-only guard for close-on-exec helper declarations to use WOLFSSL_KERNEL_MODE.
wolfcrypt/src/wc_port.c Updates the userspace-only guard for fcntl-based close-on-exec helper implementations to use WOLFSSL_KERNEL_MODE.

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

Comment thread wolfcrypt/src/wc_port.c
Comment thread wolfssl/wolfcrypt/wc_port.h
@philljj philljj assigned wolfSSL-Bot and unassigned philljj May 22, 2026
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.

3 participants