summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorZaky Hermawan <44158147+ZakyHermawan@users.noreply.github.com>2025-09-23 20:54:35 +0700
committerGitHub <noreply@github.com>2025-09-23 09:54:35 -0400
commit5ad347d1a1c1bdc716dafd07a395861529c0e595 (patch)
tree7020500578ef2b6e6d70d8cbd899e8b421fcf64d /libc/include
parent154e0637c9b60108bda4e73645a3c9b9f62020c4 (diff)
[libc][POSIX][unistd] Implement gethostname (#128142)
The implementation is based on the specifications from: https://man7.org/linux/man-pages/man2/gethostname.2.html Closes https://github.com/llvm/llvm-project/issues/126602 --------- Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/unistd.yaml7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/include/unistd.yaml b/libc/include/unistd.yaml
index 051e92b00674..3ba3ec71c25c 100644
--- a/libc/include/unistd.yaml
+++ b/libc/include/unistd.yaml
@@ -141,6 +141,13 @@ functions:
return_type: uid_t
arguments:
- type: void
+ - name: gethostname
+ standards:
+ - POSIX
+ return_type: int
+ arguments:
+ - type: char *
+ - type: size_t
- name: getopt
standards:
- POSIX