Allow the use of readlinkat over readlink.
This can be useful in situations where readlink is disallowed.
This commit is contained in:
committed by
David Goldblatt
parent
126252a7e6
commit
e8ec9528ab
@@ -961,7 +961,12 @@ malloc_conf_init(sc_data_t *sc_data) {
|
||||
* Try to use the contents of the "/etc/malloc.conf"
|
||||
* symbolic link's name.
|
||||
*/
|
||||
#ifndef JEMALLOC_READLINKAT
|
||||
linklen = readlink(linkname, buf, sizeof(buf) - 1);
|
||||
#else
|
||||
linklen = readlinkat(AT_FDCWD, linkname, buf,
|
||||
sizeof(buf) - 1);
|
||||
#endif
|
||||
if (linklen == -1) {
|
||||
/* No configuration specified. */
|
||||
linklen = 0;
|
||||
|
Reference in New Issue
Block a user