Permalink
Browse files

FreeBSD build fixes for ptex.

  • Loading branch information...
1 parent 38dadbc commit d0dfcf607e13585a891267f135779027521b60f8 @brechtvl committed Dec 9, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/ptex.imageio/ptex/PtexPlatform.h
@@ -60,7 +60,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
// linux/unix/posix
#include <stdlib.h>
+#ifndef __FreeBSD__
#include <alloca.h>
+#endif
#include <string.h>
#include <pthread.h>
// OS for spinlock
@@ -83,14 +85,16 @@ typedef __int64 FilePos;
#define fseeko _fseeki64
#define ftello _ftelli64
-inline double log2(double x) {
- return log(x) * 1.4426950408889634;
-}
-
#else
typedef off_t FilePos;
#endif
+#if defined(WINDOWS) || defined(__FreeBSD__)
+inline double log2(double x) {
+ return log(x) * 1.4426950408889634;
+}
+#endif
+
namespace PtexInternal {

0 comments on commit d0dfcf6

Please sign in to comment.