diff --git a/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch b/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch
new file mode 100644
index 0000000000..fe723d76d6
--- /dev/null
+++ b/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch
@@ -0,0 +1,17 @@
+--- libexplain-1.4.D001.orig/libexplain/buffer/file_inode_flags.c
++++ libexplain-1.4.D001/libexplain/buffer/file_inode_flags.c
+@@ -28,6 +28,14 @@
+
+ #if defined(FS_IOC_GETFLAGS) || defined(FS_IOC32_GETFLAGS)
+
++#ifndef FS_ECOMPR_FL
++#define FS_ECOMPR_FL 0x00000800 /* Compression error */
++#endif
++
++#ifndef FS_DIRECTIO_FL
++#define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */
++#endif
++
+ void
+ explain_buffer_file_inode_flags(explain_string_buffer_t *sb, int value)
+ {
\ No newline at end of file
diff --git a/x11/library/libexplain/pspec.xml b/x11/library/libexplain/pspec.xml
index c1ce5acf22..8b1f4da976 100644
--- a/x11/library/libexplain/pspec.xml
+++ b/x11/library/libexplain/pspec.xml
@@ -21,8 +21,12 @@
libtool
bison
groff
+ jbigkit-devel
ghostscript-devel
+
+ libexplain-1.4-missing-defines.patch
+