Skip to content

fix: emulate pipe2 with pipe + fcntl on platforms without it - #14

Merged
connortechnology merged 1 commit into
ZoneMinder:masterfrom
SteveGilvarry:macos-pipe2-portability
Jul 22, 2026
Merged

fix: emulate pipe2 with pipe + fcntl on platforms without it#14
connortechnology merged 1 commit into
ZoneMinder:masterfrom
SteveGilvarry:macos-pipe2-portability

Conversation

@SteveGilvarry

Copy link
Copy Markdown
Member

pipe2() is Linux-only; macOS and the BSDs fail to compile with:

src/net/Pipe.cpp:60:6: error: use of undeclared identifier 'pipe2'

This keeps pipe2() on Linux and falls back to pipe() + fcntl() setting O_NONBLOCK/FD_CLOEXEC on both fds elsewhere (Windows path unchanged). Part of making ZoneMinder build natively on macOS — ZoneMinder/zoneminder#4998.

🤖 Generated with Claude Code

pipe2() is Linux-only; macOS and the BSDs fail to compile with
'use of undeclared identifier pipe2'. Fall back to pipe() followed
by fcntl() to set O_NONBLOCK and FD_CLOEXEC on both ends.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@connortechnology
connortechnology merged commit e9a8806 into ZoneMinder:master Jul 22, 2026
1 check passed
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.

2 participants