This patch documents a few portability problems with musl libc.

2026-11-23  Bruno Haible  <[email protected]>

        Document a few musl libc problems.
        * doc/posix-functions/gethostent.texi: Document the musl libc problem.
        * doc/posix-functions/getnetent.texi: Likewise.
        * doc/posix-functions/getservent.texi: Likewise.
        * doc/posix-functions/getservbyname.texi: Likewise.
        * doc/posix-functions/getservbyport.texi: Likewise.

diff --git a/doc/posix-functions/gethostent.texi 
b/doc/posix-functions/gethostent.texi
index 4b234d93a8..6a71e1559f 100644
--- a/doc/posix-functions/gethostent.texi
+++ b/doc/posix-functions/gethostent.texi
@@ -15,4 +15,8 @@
 @item
 This function is missing on some platforms:
 Minix 3.1.8, Cygwin 2.9, mingw, MSVC 14.
+@item
+This function always returns @code{NULL} (as if @file{/etc/hosts} were empty)
+on some platforms:
+musl libc.
 @end itemize
diff --git a/doc/posix-functions/getnetent.texi 
b/doc/posix-functions/getnetent.texi
index 8c3845032f..48912d40c1 100644
--- a/doc/posix-functions/getnetent.texi
+++ b/doc/posix-functions/getnetent.texi
@@ -15,4 +15,8 @@
 @item
 This function is missing on some platforms:
 Cygwin 2.9, mingw, MSVC 14, Android 8.1.
+@item
+This function always returns @code{NULL} (as if @file{/etc/networks} were 
empty)
+on some platforms:
+musl libc.
 @end itemize
diff --git a/doc/posix-functions/getservbyname.texi 
b/doc/posix-functions/getservbyname.texi
index 93eddab92e..6b32a06517 100644
--- a/doc/posix-functions/getservbyname.texi
+++ b/doc/posix-functions/getservbyname.texi
@@ -20,4 +20,8 @@
 @item
 On Windows, in 32-bit mode, this function is defined with a calling
 convention that is different from @code{cdecl}.
+@item
+The returned @code{struct servent} has a nonsensical @code{s_aliases} value
+on some platforms:
+musl libc.
 @end itemize
diff --git a/doc/posix-functions/getservbyport.texi 
b/doc/posix-functions/getservbyport.texi
index 01665136c4..262482dd26 100644
--- a/doc/posix-functions/getservbyport.texi
+++ b/doc/posix-functions/getservbyport.texi
@@ -20,4 +20,8 @@
 @item
 On Windows, in 32-bit mode, this function is defined with a calling
 convention that is different from @code{cdecl}.
+@item
+The returned @code{struct servent} has a nonsensical @code{s_aliases} value
+on some platforms:
+musl libc.
 @end itemize
diff --git a/doc/posix-functions/getservent.texi 
b/doc/posix-functions/getservent.texi
index 91848c6ecb..931f6c1723 100644
--- a/doc/posix-functions/getservent.texi
+++ b/doc/posix-functions/getservent.texi
@@ -15,4 +15,8 @@
 @item
 This function is missing on some platforms:
 mingw, MSVC 14.
+@item
+This function always returns @code{NULL} (as if @file{/etc/services} were 
empty)
+on some platforms:
+musl libc.
 @end itemize




Reply via email to