[PATCH] Fix mknod compilation on the FreeBSD
Alex Samorukov
samm at os2.kiev.ua
Mon Jan 4 00:25:48 UTC 2021
<sys/sysmacros.h> is linux-only
FreeBSD defines makedev in sys/types.h already included in the libbb.h.
Signed-off-by: Alex Samorukov <samm at os2.kiev.ua>
---
coreutils/mknod.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index eee0ac71d..ae3b73c08 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -36,7 +36,9 @@
//usage: "$ mknod /dev/fd0 b 2 0\n"
//usage: "$ mknod -m 644 /tmp/pipe p\n"
+#ifdef __linux__
#include <sys/sysmacros.h> // For makedev
+#endif
#include "libbb.h"
#include "libcoreutils/coreutils.h"
--
2.29.1
More information about the busybox
mailing list