summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2003-08-19 23:01:46 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2003-08-19 23:01:46 +0000
commit89a26fd1fce00fc24d05956b3b32ac782ab144a4 (patch)
tree5b436576d8b07d6ddd0812df2201b0d2c7da9912 /lib
parent0a915fad5da8eccfd534ec4fc376a06e1576b572 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/Makefile1
-rw-r--r--lib/libc/gen/gethostname.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 79ad35d96cd1..1969291effda 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -9,6 +9,7 @@
# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the
# system call stubs.
LIB=c
+# If you bump SHLIB_MAJOR, remove kluge from gen/gethostname.c.
SHLIB_MAJOR= 5
SHLIBDIR?= /lib
CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c
index 37b52ca208a5..acc338680633 100644
--- a/lib/libc/gen/gethostname.c
+++ b/lib/libc/gen/gethostname.c
@@ -49,6 +49,9 @@ gethostname(name, namelen)
{
int mib[2];
+ /* Kluge to avoid ABI breakage. */
+ namelen = (int)namelen;
+
mib[0] = CTL_KERN;
mib[1] = KERN_HOSTNAME;
if (sysctl(mib, 2, name, &namelen, NULL, 0) == -1) {