Skip to content

Fixes clamdscan "Unable to determine the filepath given the file descriptor"#1655

Open
finchy wants to merge 1 commit intoCisco-Talos:mainfrom
finchy:1653-OpenBSD-correction
Open

Fixes clamdscan "Unable to determine the filepath given the file descriptor"#1655
finchy wants to merge 1 commit intoCisco-Talos:mainfrom
finchy:1653-OpenBSD-correction

Conversation

@finchy
Copy link
Contributor

@finchy finchy commented Dec 22, 2025

Fixes #1653

Updated the CheckFDPassing.cmake file to ensure proper support for file descriptor passing on OpenBSD by conditionally defining _XOPEN_SOURCE. The logic now attempts to compile without this definition first, and if that fails, retries with it. Additionally, included fdpassing.h at the beginning of clamdcom.c to ensure correct macro definitions.

…riptor" Fixes Cisco-Talos#1653

Updated the CheckFDPassing.cmake file to ensure proper support for file descriptor passing on OpenBSD by conditionally defining _XOPEN_SOURCE. The logic now attempts to compile without this definition first, and if that fails, retries with it. Additionally, included fdpassing.h at the beginning of clamdcom.c to ensure correct macro definitions.
@finchy finchy force-pushed the 1653-OpenBSD-correction branch from e3417bb to 56d4042 Compare December 22, 2025 18:15
@Mohataseem89
Copy link

This is a solid portability fix. i especially like that the CMake logic first attempts compilation without _XOPEN_SOURCE before redefining it conditionally that avoids unnecessarily altering feature test macros on platforms where it is not required

one question: did you verify whether redefining _XOPEN_SOURCE could implicitly affect other headers (e.g., socket or sys/stat behavior) on OpenBSD builds of clamdscan? Sometimes feature-test macros subtly change struct definitions

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.

clamdscan "Unable to determine the filepath given the file descriptor"

2 participants