mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 08:06:41 +02:00
Fix compile error on macOS
This commit is contained in:
parent
ebae6c128f
commit
0a03ddb46b
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ PipeStream::PipeStream(PcmListener* pcmListener, boost::asio::io_context& ioc, c
|
|||
void PipeStream::do_connect()
|
||||
{
|
||||
int fd = open(uri_.path.c_str(), O_RDONLY | O_NONBLOCK);
|
||||
LOG(INFO, LOG_TAG) << "Connect fd: " << fd << ", pipe size: " << fcntl(fd, F_GETPIPE_SZ) << "\n";
|
||||
int pipe_size = -1;
|
||||
#if !defined(MACOS)
|
||||
pipe_size = fcntl(fd, F_GETPIPE_SZ);
|
||||
#endif
|
||||
LOG(INFO, LOG_TAG) << "Stream: " << name_ << ", connect to pipe: " << uri_.path << ", fd: " << fd << ", pipe size: " << pipe_size << "\n";
|
||||
stream_ = std::make_unique<boost::asio::posix::stream_descriptor>(ioc_, fd);
|
||||
on_connect();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue