Skip to content

SGX build does not have fcntl.h#10524

Open
JacobBarthelmeh wants to merge 1 commit into
wolfSSL:masterfrom
JacobBarthelmeh:sgx
Open

SGX build does not have fcntl.h#10524
JacobBarthelmeh wants to merge 1 commit into
wolfSSL:masterfrom
JacobBarthelmeh:sgx

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

Fix for nightly SGX test

@JacobBarthelmeh JacobBarthelmeh self-assigned this May 23, 2026
Copilot AI review requested due to automatic review settings May 23, 2026 05:21
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 adjusts the close-on-exec helper declarations/definitions so they are not built for WOLFSSL_SGX, avoiding inclusion of <fcntl.h> in SGX builds (where it isn’t available) and fixing the nightly SGX build failure.

Changes:

  • Exclude WOLFSSL_SGX from the Unix/Apple wc_*_cloexec helper prototypes in wc_port.h.
  • Exclude WOLFSSL_SGX from the Unix/Apple wc_*_cloexec helper implementations (and <fcntl.h> include) in wc_port.c.
  • Update the closing #endif comment in wc_port.c to reflect the new condition.

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 Avoids exposing the Unix/Apple close-on-exec helper prototypes when building for SGX.
wolfcrypt/src/wc_port.c Prevents compiling the close-on-exec helpers (and including <fcntl.h>) under SGX to fix SGX build environments lacking that header.

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

@JacobBarthelmeh JacobBarthelmeh marked this pull request as ready for review May 23, 2026 05:26
@JacobBarthelmeh
Copy link
Copy Markdown
Contributor Author

Retest this please Jenkins

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