Skip to content

Commit

Permalink
Merge pull request #94 from artemist/freebsd-fix
Browse files Browse the repository at this point in the history
Fix build on FreeBSD
  • Loading branch information
aras-p committed May 27, 2024
2 parents 2ff17ba + 058150d commit 225fe2b
Show file tree
Hide file tree
Showing 4 changed files with 911 additions and 274 deletions.
2 changes: 1 addition & 1 deletion src/BuildEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ifdef _MSC_VER
#define ftello64 _ftelli64
#elif defined(__APPLE__)
#elif defined(__APPLE__) || defined(__FreeBSD__)
#define ftello64 ftello
#endif

Expand Down
10 changes: 6 additions & 4 deletions src/external/enkiTS/LockLessMultiReadPipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
#pragma once

#include <stdint.h>
#include <assert.h>

#include <atomic>
#include <string.h>

#ifndef ENKI_ASSERT
#include <assert.h>
#define ENKI_ASSERT(x) assert(x)
#endif

namespace enki
{
Expand Down Expand Up @@ -90,7 +92,7 @@ namespace enki
, m_ReadCount(0)
, m_ReadIndex(0)
{
assert( cSizeLog2 < 32 );
ENKI_ASSERT( cSizeLog2 < 32 );
memset( (void*)m_Flags, 0, sizeof( m_Flags ) );
}

Expand Down Expand Up @@ -241,7 +243,7 @@ namespace enki
// Add - safe to perform from any thread
void WriterWriteFront( T* pNode_ )
{
assert( pNode_ );
ENKI_ASSERT( pNode_ );
pNode_->pNext = NULL;
T* pPrev = pHead.exchange( pNode_ );
pPrev->pNext = pNode_;
Expand Down
Loading

0 comments on commit 225fe2b

Please sign in to comment.