ld.elf_so: sysctl support uncommented

Change-Id: I253f3b4a2ef8c5b3fb332eb98a08d328a9591c52
This commit is contained in:
Lionel Sambuc 2015-12-30 23:22:55 +01:00
parent 2988757685
commit b3bac6e0e7
2 changed files with 0 additions and 16 deletions

View File

@ -206,16 +206,11 @@ static bool
_rtld_load_by_name(const char *name, Obj_Entry *obj, Needed_Entry **needed, _rtld_load_by_name(const char *name, Obj_Entry *obj, Needed_Entry **needed,
int flags) int flags)
{ {
#if !defined(__minix)
Library_Xform *x = _rtld_xforms; Library_Xform *x = _rtld_xforms;
#endif /* !defined(__minix) */
Obj_Entry *o; Obj_Entry *o;
#if !defined(__minix)
size_t j; size_t j;
ssize_t i; ssize_t i;
#endif /* !defined(__minix) */
bool got = false; bool got = false;
#if !defined(__minix)
union { union {
int i; int i;
u_quad_t q; u_quad_t q;
@ -223,7 +218,6 @@ _rtld_load_by_name(const char *name, Obj_Entry *obj, Needed_Entry **needed,
} val; } val;
dbg(("load by name %s %p", name, x)); dbg(("load by name %s %p", name, x));
#endif /* !defined(__minix) */
for (o = _rtld_objlist->next; o != NULL; o = o->next) for (o = _rtld_objlist->next; o != NULL; o = o->next)
if (_rtld_object_match_name(o, name)) { if (_rtld_object_match_name(o, name)) {
++o->refcount; ++o->refcount;
@ -231,7 +225,6 @@ _rtld_load_by_name(const char *name, Obj_Entry *obj, Needed_Entry **needed,
return true; return true;
} }
#if !defined(__minix)
for (; x; x = x->next) { for (; x; x = x->next) {
if (strcmp(x->name, name) != 0) if (strcmp(x->name, name) != 0)
continue; continue;
@ -297,7 +290,6 @@ _rtld_load_by_name(const char *name, Obj_Entry *obj, Needed_Entry **needed,
} }
} }
#endif /* !defined(__minix) */
if (got) if (got)
return true; return true;

View File

@ -49,9 +49,7 @@ __RCSID("$NetBSD: paths.c,v 1.41 2013/05/06 08:02:20 skrll Exp $");
#include <sys/gmon.h> #include <sys/gmon.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/mount.h> #include <sys/mount.h>
#if !defined(__minix)
#include <sys/mbuf.h> #include <sys/mbuf.h>
#endif /* !defined(__minix) */
#include <sys/resource.h> #include <sys/resource.h>
#include <machine/cpu.h> #include <machine/cpu.h>
@ -67,9 +65,7 @@ static char *exstrdup(const char *, const char *);
static const char *getstr(const char **, const char *, const char *); static const char *getstr(const char **, const char *, const char *);
static const char *getcstr(const char **, const char *, const char *); static const char *getcstr(const char **, const char *, const char *);
static const char *getword(const char **, const char *, const char *); static const char *getword(const char **, const char *, const char *);
#if !defined(__minix)
static int matchstr(const char *, const char *, const char *); static int matchstr(const char *, const char *, const char *);
#endif /* !defined(__minix) */
static const char WS[] = " \t\n"; static const char WS[] = " \t\n";
@ -146,7 +142,6 @@ getword(const char **p, const char *ep, const char *delim)
return (getstr(p, ep, delim)); return (getstr(p, ep, delim));
} }
#if !defined(__minix)
/* /*
* Match `bp' against NUL terminated string pointed by `p'. * Match `bp' against NUL terminated string pointed by `p'.
*/ */
@ -161,7 +156,6 @@ matchstr(const char *p, const char *bp, const char *ep)
return (*p == 0); return (*p == 0);
} }
#endif /* !defined(__minix) */
static Search_Path * static Search_Path *
_rtld_find_path(Search_Path *path, const char *pathstr, size_t pathlen) _rtld_find_path(Search_Path *path, const char *pathstr, size_t pathlen)
@ -414,7 +408,6 @@ _rtld_process_hints(const char *execname, Search_Path **path_p,
(void)munmap(buf, sz); (void)munmap(buf, sz);
} }
#if !defined(__minix)
/* Basic name -> sysctl MIB translation */ /* Basic name -> sysctl MIB translation */
int int
_rtld_sysctl(const char *name, void *oldp, size_t *oldlen) _rtld_sysctl(const char *name, void *oldp, size_t *oldlen)
@ -483,4 +476,3 @@ bad:
xfree(result); xfree(result);
return (-1); return (-1);
} }
#endif /* !defined(__minix) */