Skip to content
Snippets Groups Projects
Commit 966522a1 authored by Aaron Quinlan's avatar Aaron Quinlan
Browse files

Merge pull request #112 from cinquin/master

Allow compilation with FreeBSD/clang.
parents dfabf63a a4647ea2
No related branches found
No related tags found
No related merge requests found
#include <math.h> #include <cmath>
#include <stdlib.h> #include <stdlib.h>
/* Log gamma function /* Log gamma function
...@@ -243,7 +243,7 @@ double kt_fisher_exact(long long n11, long long n12, long long n21, long long n2 ...@@ -243,7 +243,7 @@ double kt_fisher_exact(long long n11, long long n12, long long n21, long long n2
*two = left + right; *two = left + right;
if (*two > 1.) *two = 1.; if (*two > 1.) *two = 1.;
// adjust left and right // adjust left and right
if (abs(i - n11) < abs(j - n11)) right = 1. - left + q; if (abs((long) (i - n11)) < abs((long) (j - n11))) right = 1. - left + q;
else left = 1.0 - right + q; else left = 1.0 - right + q;
*_left = left; *_right = right; *_left = left; *_right = right;
return q; return q;
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
// Provides DNS lookup functionality for hostname & its discovered addresses // Provides DNS lookup functionality for hostname & its discovered addresses
// *************************************************************************** // ***************************************************************************
#ifdef __FreeBSD__
#include <netinet/in.h>
#endif
#include "api/internal/io/HostInfo_p.h" #include "api/internal/io/HostInfo_p.h"
using namespace BamTools; using namespace BamTools;
using namespace BamTools::Internal; using namespace BamTools::Internal;
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Provides low-level implementation of TCP I/O for all UNIX-like systems // Provides low-level implementation of TCP I/O for all UNIX-like systems
// *************************************************************************** // ***************************************************************************
#ifdef __FreeBSD__
#include <netinet/in.h>
#endif
#include "api/internal/io/TcpSocketEngine_p.h" #include "api/internal/io/TcpSocketEngine_p.h"
#include "api/internal/io/NetUnix_p.h" #include "api/internal/io/NetUnix_p.h"
using namespace BamTools; using namespace BamTools;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment