summaryrefslogtreecommitdiff
path: root/src/libstrongswan/crypto/crypto_tester.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/crypto/crypto_tester.c')
-rw-r--r--src/libstrongswan/crypto/crypto_tester.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c
index c6780daf1..d09844bfa 100644
--- a/src/libstrongswan/crypto/crypto_tester.c
+++ b/src/libstrongswan/crypto/crypto_tester.c
@@ -14,8 +14,10 @@
* for more details.
*/
-#define _GNU_SOURCE
-#include <dlfcn.h>
+#ifdef HAVE_DLADDR
+# define _GNU_SOURCE
+# include <dlfcn.h>
+#endif
#include <time.h>
#include "crypto_tester.h"
@@ -102,7 +104,7 @@ static const char* get_name(void *sym)
return "unknown";
}
-#ifdef CLOCK_THREAD_CPUTIME_ID
+#if defined(CLOCK_THREAD_CPUTIME_ID) && defined(HAVE_CLOCK_GETTIME)
/**
* Start a benchmark timer