--- /dev/null
+Description: Fix build problem on arm64.
+ Reorder include statements to fix build problem on arm64.
+Author: Gordan Bobic <gordan@redsleeve.org>
+Origin: ubuntu
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere@hungry.com>
+Last-Update: 2016-05-12
+
+From d76d9c696a79b07a4d874f20855d8828d84f03f6 Mon Sep 17 00:00:00 2001
+From: Gordan Bobic <gordan@redsleeve.org>
+Date: Tue, 15 Mar 2016 17:17:51 +0000
+Subject: [PATCH] Fix aarch64 compilation
+
+sys/param.h depends on types defined in sys/types.h
+(hrtime_t & timestruc_t).
+
+Signed-off-by: Gordan Bobic <gordan@redsleeve.org>
+Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #4420
+---
+ lib/libspl/include/sys/types.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/libspl/include/sys/types.h b/lib/libspl/include/sys/types.h
+index 9816345..25d56be 100644
+--- a/lib/libspl/include/sys/types.h
++++ b/lib/libspl/include/sys/types.h
+@@ -30,7 +30,6 @@
+ #include <sys/isa_defs.h>
+ #include <sys/feature_tests.h>
+ #include_next <sys/types.h>
+-#include <sys/param.h> /* for NBBY */
+ #include <sys/types32.h>
+ #include <sys/va_list.h>
+
+@@ -95,4 +94,6 @@ typedef union {
+ } lloff_t;
+ #endif
+
++#include <sys/param.h> /* for NBBY */
++
+ #endif
+--
+2.7.3
+