1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

relay on PATH to find executables

This commit is contained in:
albfan 2016-07-02 15:22:13 +02:00
parent c6d645d720
commit 4637409d0b
6 changed files with 28 additions and 24 deletions

View file

@ -386,7 +386,7 @@ static int supplicant_group_spawn_dhcp_server(struct supplicant_group *g,
}
i = 0;
argv[i++] = (char*) BUILD_BINDIR "/miracle-dhcp";
argv[i++] = (char*) "miracle-dhcp";
argv[i++] = "--server";
argv[i++] = "--prefix";
argv[i++] = prefix;
@ -398,7 +398,9 @@ static int supplicant_group_spawn_dhcp_server(struct supplicant_group *g,
argv[i++] = commfd;
argv[i] = NULL;
execve(argv[0], argv, environ);
if (execvpe(argv[0], argv, environ)< 0) {
log_error("dhcp failed (%d): %m", errno);
}
_exit(1);
}
@ -448,7 +450,7 @@ static int supplicant_group_spawn_dhcp_client(struct supplicant_group *g)
}
i = 0;
argv[i++] = (char*) BUILD_BINDIR "/miracle-dhcp";
argv[i++] = (char*) "miracle-dhcp";
argv[i++] = "--log-level";
argv[i++] = loglevel;
argv[i++] = "--netdev";
@ -457,7 +459,9 @@ static int supplicant_group_spawn_dhcp_client(struct supplicant_group *g)
argv[i++] = commfd;
argv[i] = NULL;
execve(argv[0], argv, environ);
if (execvpe(argv[0], argv, environ) < 0) {
log_error("dhcp failed (%d): %m", errno);
}
_exit(1);
}