summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-12-20 01:41:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-12-20 01:43:31 +0100
commit0650a4ee30e34ba039940032fdff3719c1b4b000 (patch)
tree4f81613aee6f2b8286a751b0b1bd92d86d164fe7 /include
parent3c0b306d01a95e17579d938d8e9e8c527c251a4a (diff)
vm_map: Fix taking into account high bits in mask
glibc's sysdeps/mach/hurd/dl-sysdep.c has been wanting to use this for decades. * include/string.h (ffs): New declaration. * vm/vm_map.c: Include <string.h>. (vm_map_find_entry_anywhere): Separate out high bits from mask, to compute the maximum offset instead of map->max_offset. * doc/mach.texi (vm_map): Update documentation accordingly.
Diffstat (limited to 'include')
-rw-r--r--include/string.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index c31b4292..cddcbeb9 100644
--- a/include/string.h
+++ b/include/string.h
@@ -54,4 +54,6 @@ extern size_t strlen (const char *s) __attribute__ ((pure));
extern char *strstr(const char *haystack, const char *needle);
+extern int ffs(int i);
+
#endif /* _MACH_SA_SYS_STRING_H_ */