summaryrefslogtreecommitdiffstats
path: root/gl/gethostname.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2026-03-26 12:53:53 +0100
committerGitHub <noreply@github.com>2026-03-26 12:53:53 +0100
commit13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 (patch)
tree3aa7186fe092e42783dc7e981dc39a74ea61c466 /gl/gethostname.c
parent9d8503f90ef25b2cecd324dc118e441f40233ea8 (diff)
downloadmonitoring-plugins-13e14a6bfd9f29cbfeab0c5161d2a994f97532e7.tar.gz
Update/gnulib 2026 03 (#2247)HEADmaster
* Sync with the 202601-stable Gnulib code (4a3650d887) * Ignore more deps stuff in gnulib * Remove autogenerated gnulib files * Ignore more gnulib generated headers
Diffstat (limited to 'gl/gethostname.c')
-rw-r--r--gl/gethostname.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gl/gethostname.c b/gl/gethostname.c
index 8f0ceafc..464bac39 100644
--- a/gl/gethostname.c
+++ b/gl/gethostname.c
@@ -1,6 +1,6 @@
1/* gethostname emulation for SysV and POSIX.1. 1/* gethostname emulation for SysV and POSIX.1.
2 2
3 Copyright (C) 1992, 2003, 2006, 2008-2025 Free Software Foundation, Inc. 3 Copyright (C) 1992, 2003, 2006, 2008-2026 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -89,12 +89,10 @@ gethostname (char *name, size_t len)
89int 89int
90rpl_gethostname (char *name, size_t len) 90rpl_gethostname (char *name, size_t len)
91{ 91{
92 int r;
93
94 if (len > INT_MAX) 92 if (len > INT_MAX)
95 len = INT_MAX; 93 len = INT_MAX;
96 gl_sockets_startup (SOCKETS_1_1); 94 gl_sockets_startup (SOCKETS_1_1);
97 r = gethostname (name, (int) len); 95 int r = gethostname (name, (int) len);
98 if (r < 0) 96 if (r < 0)
99 set_winsock_errno (); 97 set_winsock_errno ();
100 98