Skip to content

Commit 046439f

Browse files
Pull up following revision(s) (requested by christos in ticket #46):
lib/libc/gen/sysctl.c: revision 1.39 distrib/utils/libhack/Makefile.inc: revision 1.40 We don't need descriptions for install media. Use a trimmed version of sysctl to reduce the size so that atari floppies work again.
1 parent 5326c17 commit 046439f

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

distrib/utils/libhack/Makefile.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile.inc,v 1.39 2021/05/25 10:58:41 martin Exp $
1+
# $NetBSD: Makefile.inc,v 1.39.8.1 2025/10/03 16:09:32 martin Exp $
22
#
33
# Include this fragment to build libhack.o
44
# It is .o and not .a to make sure these are the
@@ -23,7 +23,7 @@ CPPFLAGS+= -DLIBHACK
2323

2424
HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \
2525
localeconv.o multibyte.o perror.o runetable.o setlocale.o \
26-
nl_langinfo.o strcasecmp.o \
26+
nl_langinfo.o strcasecmp.o sysctl.o \
2727
strerror.o strsignal.o syslog.o utmp.o fmtcheck.o \
2828
aligned_alloc.o regcomp.o regexec.o wrap.o
2929

@@ -65,6 +65,7 @@ CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \
6565
-DALL_80_TO_FF_SW1
6666

6767
CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include
68+
CPPFLAGS.sysctl.c+= -I${HACKSRC}/../../../lib/libc/include
6869
CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include
6970
CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net
7071

@@ -100,6 +101,7 @@ setlocale.o: ${HACKSRC}/setlocale.c
100101
strerror.o: ${HACKSRC}/strerror.c
101102
strsignal.o: ${HACKSRC}/strsignal.c
102103
syslog.o: ${HACKSRC}/syslog.c
104+
sysctl.o: ${HACKSRC}/sysctl.c
103105
utmp.o: ${HACKSRC}/utmp.c
104106
.if (${USE_YP} != "no")
105107
yplib.o: ${HACKSRC}/yplib.c

lib/libc/gen/sysctl.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: sysctl.c,v 1.38 2021/03/30 15:31:51 rillig Exp $ */
1+
/* $NetBSD: sysctl.c,v 1.38.10.1 2025/10/03 16:09:32 martin Exp $ */
22

33
/*-
44
* Copyright (c) 1993
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94";
3636
#else
37-
__RCSID("$NetBSD: sysctl.c,v 1.38 2021/03/30 15:31:51 rillig Exp $");
37+
__RCSID("$NetBSD: sysctl.c,v 1.38.10.1 2025/10/03 16:09:32 martin Exp $");
3838
#endif
3939
#endif /* LIBC_SCCS and not lint */
4040

@@ -106,14 +106,19 @@ user_sysctl(const int *name, unsigned int namelen,
106106
void *oldp, size_t *oldlenp,
107107
const void *newp, size_t newlen)
108108
{
109+
#ifndef SMALL
110+
#define X(a) a
111+
#else
112+
#define X(a) ""
113+
#endif
109114
#define _INT(s, n, v, d) { \
110115
.sysctl_flags = CTLFLAG_IMMEDIATE|CTLFLAG_PERMANENT| \
111116
CTLTYPE_INT|SYSCTL_VERSION, \
112117
.sysctl_size = sizeof(int), \
113118
.sysctl_name = (s), \
114119
.sysctl_num = (n), \
115120
.sysctl_un.scu_idata = (v), \
116-
.sysctl_desc = (d), \
121+
.sysctl_desc = X(d), \
117122
}
118123

119124
/*

0 commit comments

Comments
 (0)