summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-24 04:11:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-24 04:11:11 +0000
commitf4836b6d05c454ec22dcd8656f58b151a3970047 (patch)
tree8d7df3890632232ec5b42601e7c334f120773cc1 /libexec/ld.so/library.c
parent2647b624657fb649232b187356361551c6b5af11 (diff)
ok i found it
Diffstat (limited to 'libexec/ld.so/library.c')
-rw-r--r--libexec/ld.so/library.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c
index f4cda333b8c..f01b4eeb0e3 100644
--- a/libexec/ld.so/library.c
+++ b/libexec/ld.so/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.20 2002/07/24 04:00:44 deraadt Exp $ */
+/* $OpenBSD: library.c,v 1.21 2002/07/24 04:11:10 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -64,7 +64,7 @@ static elf_object_t *_dl_tryload_shlib(const char *libname, int type);
* This fucntion determines if a given name matches what is specified
* in a struct sod. The major must match exactly, and the minor must
* be same or larger.
- *
+ *
* sodp is updated with the minor if this matches.
*/
@@ -98,7 +98,7 @@ _dl_match_file(struct sod *sodp, char *name, int namelen)
match = 1;
/* return version matched */
- sodp->sod_minor = lsod.sod_minor;
+ sodp->sod_minor = lsod.sod_minor;
}
_dl_free((char *)lsod.sod_name);
@@ -119,7 +119,7 @@ _dl_find_shlib(struct sod *sodp, const char *searchpath, int nohints)
struct dirent *dp;
int match;
- /* if we are to search default directories, and hints
+ /* if we are to search default directories, and hints
* are not to be used, search the standard path from ldconfig
* (_dl_hint_search_path) or use the default path
*/
@@ -134,7 +134,7 @@ _dl_find_shlib(struct sod *sodp, const char *searchpath, int nohints)
return hint;
} else {
/* search hints requesting matches for only
- * the searchpath directories,
+ * the searchpath directories,
*/
pp = searchpath;
while (pp) {
@@ -164,7 +164,7 @@ nohints:
if (searchpath == NULL) {
if (_dl_hint_search_path != NULL)
searchpath = _dl_hint_search_path;
- else
+ else
searchpath = DEFAULT_PATH;
}
pp = searchpath;
@@ -426,7 +426,7 @@ _dl_tryload_shlib(const char *libname, int type)
if (phdp->p_type == PT_LOAD) {
char *start = (char *)(phdp->p_vaddr & ~align) + loff;
int size = (phdp->p_vaddr & align) + phdp->p_filesz;
- int res;
+ void *res;
res = _dl_mmap(start, size, PFLAGS(phdp->p_flags),
MAP_FIXED|MAP_PRIVATE, libfile,
@@ -437,7 +437,7 @@ _dl_tryload_shlib(const char *libname, int type)
next_load->start = start;
next_load->size = size;
next_load->prot = PFLAGS(phdp->p_flags);
- if (_dl_check_error(res)) {
+ if (_dl_check_error((long)res)) {
_dl_printf("%s: rtld mmap failed mapping %s.\n",
_dl_progname, libname);
_dl_close(libfile);
@@ -456,7 +456,7 @@ _dl_tryload_shlib(const char *libname, int type)
res = _dl_mmap(start, size,
PFLAGS(phdp->p_flags),
MAP_FIXED|MAP_PRIVATE|MAP_ANON, -1, 0);
- if (_dl_check_error(res)) {
+ if (_dl_check_error((long)res)) {
_dl_printf("%s: rtld mmap failed mapping %s.\n",
_dl_progname, libname);
_dl_close(libfile);