--- a/ipc/chromium/src/base/dir_reader_posix.h
+++ b/ipc/chromium/src/base/dir_reader_posix.h
@@ -20,7 +20,7 @@
 
 #if defined(OS_LINUX)
 #include "base/dir_reader_linux.h"
-#elif defined(OS_BSD)
+#elif defined(OS_BSD) && !defined(__GLIBC__)
 #include "base/dir_reader_bsd.h"
 #else
 #include "base/dir_reader_fallback.h"
@@ -30,7 +30,7 @@
 
 #if defined(OS_LINUX)
 typedef DirReaderLinux DirReaderPosix;
-#elif defined(OS_BSD)
+#elif defined(OS_BSD) && !defined(__GLIBC__)
 typedef DirReaderBSD DirReaderPosix;
 #else
 typedef DirReaderFallback DirReaderPosix;