diff --git a/btrfs-ioctl-fix.patch b/btrfs-ioctl-fix.patch
new file mode 100644
index 0000000..4979f48
--- /dev/null
+++ b/btrfs-ioctl-fix.patch
@@ -0,0 +1,36 @@
+
+
+This was reported when docker failed to build against
+btrfs-progs v4.8.1.
+
+It includes ioctl.h which now calls BUILD_ASSERT(), which
+is defined in kerncompat.h, which was not included in the
+ioctl.h header file.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+---
+
+diff --git a/ioctl.h b/ioctl.h
+index a7235c0..abea7ed 100644
+--- a/ioctl.h
++++ b/ioctl.h
+@@ -26,6 +26,12 @@ extern "C" {
+ #include <asm/types.h>
+ #include <linux/ioctl.h>
+ 
++#if BTRFS_FLAT_INCLUDES
++#include "kerncompat.h"
++#else
++#include <btrfs/kerncompat.h>
++#endif /* BTRFS_FLAT_INCLUDES */
++
+ #ifndef __user
+ #define __user
+ #endif
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+
diff --git a/btrfs-progs.spec b/btrfs-progs.spec
index c9cbe6d..8a85bf3 100644
--- a/btrfs-progs.spec
+++ b/btrfs-progs.spec
@@ -1,6 +1,6 @@
 Name:		btrfs-progs
 Version:	4.8.1
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Userspace programs for btrfs
 
 Group:		System Environment/Base
@@ -12,6 +12,7 @@ Source0:	https://www.kernel.org/pub/linux/kernel/people/kdave/%{name}/%{name}-v%
 # Still must reverse-engineer fixes in there and get upstream
 Patch0:		btrfs-progs-valgrind.patch
 Patch1:		btrfs-init-dev-list.patch
+Patch2:		btrfs-ioctl-fix.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -40,6 +41,7 @@ btrfs filesystem-specific programs.
 
 %prep
 %setup -q -n %{name}-v%{version}
+%patch2 -p1
 
 %build
 ./autogen.sh
@@ -81,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libbtrfs.so
 
 %changelog
+* Thu Oct 13 2016 Eric Sandeen <sandeen@redhat.com> 4.8.1-2
+- Fix build of apps including ioctl.h (bz#1384413)
+
 * Wed Oct 12 2016 Eric Sandeen <sandeen@redhat.com> 4.8.1-1
 - New upstream release