Fixed linking on things that need -ldl, and compiler warnings.
This commit is contained in:
parent
cd4aa2d9a9
commit
063875e89a
2 changed files with 10 additions and 2 deletions
|
@ -59,9 +59,13 @@ void Sys_LaunchAutoupdater(int argc, char **argv)
|
|||
char *ptr = strrchr(argv[0], '/');
|
||||
if (ptr)
|
||||
*ptr = '\0';
|
||||
chdir(argv[0]);
|
||||
if (chdir(argv[0]) == -1) {
|
||||
_exit(1); /* oh well. */
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
chdir("../.."); /* put this at base of app bundle so paths make sense later. */
|
||||
if (chdir("../..") == -1) { /* put this at base of app bundle so paths make sense later. */
|
||||
_exit(1); /* oh well. */
|
||||
}
|
||||
#endif
|
||||
snprintf(pidstr, sizeof (pidstr), "%lld", (long long) getppid());
|
||||
execl(AUTOUPDATER_BIN, AUTOUPDATER_BIN, "--waitpid", pidstr, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue