Index: src/qt/qtbase/src/3rdparty/forkfd/forkfd.c
--- src/qt/qtbase/src/3rdparty/forkfd/forkfd.c.orig	2017-03-04 16:43:14.000000000 +0100
+++ src/qt/qtbase/src/3rdparty/forkfd/forkfd.c	2017-03-04 18:10:54.856681000 +0100
@@ -23,7 +23,7 @@
 **
 ****************************************************************************/
 
-#ifndef _GNU_SOURCE
+#if !defined(_GNU_SOURCE) && !defined(__FreeBSD__)
 #  define _GNU_SOURCE
 #  define _POSIX_C_SOURCE 200809L
 #  define _XOPEN_SOURCE 700
@@ -471,6 +471,9 @@
      * cloexec pair of pipes. Without it, we have a race condition setting
      * FD_CLOEXEC
      */
+#if defined(__FreeBSD__)
+    extern int pipe2(int fildes[2], int flags);
+#endif
     ret = pipe2(filedes, O_CLOEXEC);
     if (ret == -1)
         return ret;
Index: src/qt/qtbase/src/3rdparty/icu_dependency.pri
--- src/qt/qtbase/src/3rdparty/icu_dependency.pri.orig	2017-03-04 16:43:14.000000000 +0100
+++ src/qt/qtbase/src/3rdparty/icu_dependency.pri	2017-03-04 18:10:54.857020000 +0100
@@ -10,7 +10,4 @@
     }
 } else {
     LIBS_PRIVATE += -licui18n -licuuc -licudata
-    CONFIG(static) {
-      LIBS_PRIVATE += -ldl
-    }
 }
Index: src/qt/qtbase/src/corelib/io/qstorageinfo_unix.cpp
--- src/qt/qtbase/src/corelib/io/qstorageinfo_unix.cpp.orig	2017-03-04 16:43:14.000000000 +0100
+++ src/qt/qtbase/src/corelib/io/qstorageinfo_unix.cpp	2017-03-04 18:10:54.856884000 +0100
@@ -506,9 +506,15 @@
         valid = true;
         ready = true;
 
+#if defined(Q_OS_FREEBSD)
+	bytesTotal = statfs_buf.f_blocks * statfs_buf.f_bsize;
+	bytesFree = statfs_buf.f_bfree * statfs_buf.f_bsize;
+	bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_bsize;
+#else
         bytesTotal = statfs_buf.f_blocks * statfs_buf.f_frsize;
         bytesFree = statfs_buf.f_bfree * statfs_buf.f_frsize;
         bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_frsize;
+#endif
 #if defined(Q_OS_ANDROID) || defined (Q_OS_BSD4)
 #if defined(_STATFS_F_FLAGS)
         readOnly = (statfs_buf.f_flags & ST_RDONLY) != 0;
