<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 8a917ed2afb2dd2a165a93812b6f52b9060eec5f Mon Sep 17 00:00:00 2001
From: Rui Chen &lt;rui@chenrui.dev&gt;
Date: Sun, 31 Jan 2021 12:43:12 -0500
Subject: [PATCH] fix: patch for osx build

Signed-off-by: Rui Chen &lt;rui@chenrui.dev&gt;
---
 src/blkdev/blkdev.c | 4 +++-
 src/device_info.c   | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/blkdev/blkdev.c b/src/blkdev/blkdev.c
index d97a4b3..029d694 100644
--- src/blkdev/blkdev.c.orig
+++ src/blkdev/blkdev.c
@@ -7,7 +7,9 @@
 #include &lt;sys/types.h&gt;
 #include &lt;sys/stat.h&gt;
 #include &lt;sys/ioctl.h&gt;
-#include &lt;sys/sysmacros.h&gt;
+#ifdef HAVE_SYS_SYSMACROS_H
+# include &lt;sys/sysmacros.h&gt;
+#endif
 #include &lt;unistd.h&gt;
 #include &lt;stdint.h&gt;
 #include &lt;stdio.h&gt;
diff --git a/src/device_info.c b/src/device_info.c
index 21c438f..5db5192 100644
--- src/device_info.c.orig
+++ src/device_info.c
@@ -24,7 +24,10 @@
 #include &lt;sys/types.h&gt;
 #include &lt;sys/stat.h&gt;
 #include &lt;sys/ioctl.h&gt;
-#include &lt;sys/sysmacros.h&gt;
+
+#ifdef HAVE_SYS_SYSMACROS_H
+# include &lt;sys/sysmacros.h&gt;
+#endif
 
 #ifdef HAVE_LINUX_LOOP_H
 #include &lt;linux/loop.h&gt;
</pre></body></html>