Skip to content

Commit

Permalink
Fix portable build
Browse files Browse the repository at this point in the history
execinfo.h is not available for wasm
  • Loading branch information
zer011b committed Nov 19, 2024
1 parent c2d7973 commit 5a6a38d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Helpers/PAssert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@
#include "PAssert.h"

#include <cstdlib>

#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif // HAVE_EXECINFO_H

/**
* This function is used to exit and for debugging purposes.
*/
void program_fail ()
{
#ifdef HAVE_EXECINFO_H
const unsigned bufsize = 256;
int nptrs;
void *buffer[bufsize];
Expand All @@ -50,6 +54,7 @@ void program_fail ()
}

free(strings);
#endif // HAVE_EXECINFO

exit (1);
} /* program_fail */

0 comments on commit 5a6a38d

Please sign in to comment.