summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--diskio-unix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/diskio-unix.cc b/diskio-unix.cc
index 388a04d..35032d3 100644
--- a/diskio-unix.cc
+++ b/diskio-unix.cc
@@ -74,7 +74,8 @@ int DiskIO::OpenForRead(void) {
if (fstat64(fd, &st) == 0) {
if (S_ISDIR(st.st_mode))
cerr << "The specified path is a directory!\n";
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
+#if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
+ && !defined(__APPLE__)
else if (S_ISCHR(st.st_mode))
cerr << "The specified path is a character device!\n";
#endif