aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorAlex Samorukov <samm@os2.kiev.ua>2021-01-04 01:25:48 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-01-04 13:28:28 +0100
commit28759d0e95cff70df9e4db319e0bcf310fbe7197 (patch)
treec5c609cec386e2d201785450d0deb0b2fd2e4f84 /coreutils
parent09aba8bac466ce8fb94a6b5ee587d81415ff4c44 (diff)
downloadbusybox-28759d0e95cff70df9e4db319e0bcf310fbe7197.tar.gz
Fix mknod compilation on the FreeBSD
<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@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/mknod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index eee0ac71d..b10fe4fc3 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"
-#include <sys/sysmacros.h> // For makedev
+#ifdef __linux__
+# include <sys/sysmacros.h> // For makedev
+#endif
#include "libbb.h"
#include "libcoreutils/coreutils.h"