From d79a44f35cd3fa007564084ebaf25ba1e5f5edf3 Mon Sep 17 00:00:00 2001
From: Jason King <jason.brian.king@gmail.com>
Date: Fri, 19 Apr 2019 15:33:24 +0000
Subject: [PATCH] Added doc comment w/ links explaining the difference between
 32-bit and 64-bit libc for readdir_r

---
 src/unix/mod.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index b85e8461..8c01e9a9 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -609,6 +609,12 @@ extern {
     #[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
     #[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
     #[cfg_attr(target_os = "freebsd", link_name = "readdir@FBSD_1.0")]
+    /// The 64-bit libc on Solaris and illumos only has readdir_r.  If a
+    /// 32-bit Solaris or illumos target is ever created, it should use
+    /// __posix_readdir_r.  See libc(3LIB) on Solaris or illumos:
+    /// https://illumos.org/man/3lib/libc
+    /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html
+    /// https://www.unix.com/man-page/opensolaris/3LIB/libc/
     pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
     #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
     #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]
-- 
GitLab