update _shipped file with hurd fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b883bc9884
commit
6e06da5efd
@ -2235,13 +2235,14 @@ static void zconf_endhelp(void)
|
|||||||
*/
|
*/
|
||||||
FILE *zconf_fopen(const char *name)
|
FILE *zconf_fopen(const char *name)
|
||||||
{
|
{
|
||||||
char *env, fullname[PATH_MAX+1];
|
char *env;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
f = fopen(name, "r");
|
f = fopen(name, "r");
|
||||||
if (!f && name[0] != '/') {
|
if (!f && name[0] != '/') {
|
||||||
env = getenv(SRCTREE);
|
env = getenv(SRCTREE);
|
||||||
if (env) {
|
if (env) {
|
||||||
|
char *fullname = alloca(strlen(env) + strlen(name) + 2);
|
||||||
sprintf(fullname, "%s/%s", env, name);
|
sprintf(fullname, "%s/%s", env, name);
|
||||||
f = fopen(fullname, "r");
|
f = fopen(fullname, "r");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user