Skip to content

Commit

Permalink
ifdefs around various systems 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwaszki committed Dec 31, 2023
1 parent 8815d1b commit 130a16b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_fastwave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ namespace fastwave
{
if (_buffer != nullptr) {
if (is_mmap) {
#if defined(__linux__) || defined(__APPLE__)
munmap(reinterpret_cast<void *>(_buffer), _buffer_size);
#else
throw std::runtime_error("MUNMAP is not supported on this platform!");
#endif
}
else {
free(_buffer);
Expand Down

0 comments on commit 130a16b

Please sign in to comment.