diff --git a/src/main.cpp b/src/main.cpp
index cebca68..9266ada 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,7 +18,7 @@ namespace fs = std::filesystem;
int main(int argc, char ** argv) {
cxxopts::Options options("libtree", "Show the dependency tree of binaries and optionally bundle them into a single folder.");
-#if defined(LIBTREE_HAS_AUXV_HEADER)
+#if defined(LIBTREE_HAS_AUXV_HEADER) and not defined(__FreeBSD__)
auto default_platform = reinterpret_cast<char const *>(getauxval(AT_PLATFORM));
#else
// Default to x86_64 substitution for PLATFORM if getauxval is not available.