summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2019-08-16 17:34:38 +0300
committerGitHub <noreply@github.com>2019-08-16 17:34:38 +0300
commit7b62a4038bc2d9a48c86856ab7726da311007fee (patch)
treed0871da4b647e3fb0631740f5fff7b171fa4e6e3
parent6ce96d9d6eb3fa036d73aaf535784caddc7f3552 (diff)
parent3c73bb1899278ea295dcee1bdac45ebf10e6216c (diff)
downloadaccel-ppp-7b62a4038bc2d9a48c86856ab7726da311007fee.tar.gz
accel-ppp-7b62a4038bc2d9a48c86856ab7726da311007fee.zip
Merge pull request #94 from DmitriyEshenko/onw_br1
Make gcc8 happy
-rw-r--r--accel-pppd/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/main.c b/accel-pppd/main.c
index e31a81cd..cb7e1cda 100644
--- a/accel-pppd/main.c
+++ b/accel-pppd/main.c
@@ -146,6 +146,7 @@ static void close_all_fd(void)
static void __core_restart(int soft)
{
char exe[PATH_MAX];
+ char exe_buf[PATH_MAX];
pthread_sigmask(SIG_SETMASK, &orig_set, NULL);
@@ -157,7 +158,7 @@ static void __core_restart(int soft)
close_all_fd();
sprintf(exe, "/proc/%u/exe", getpid());
- readlink(exe, exe, PATH_MAX);
+ readlink(exe, exe_buf, PATH_MAX);
while (1) {
execv(exe, argv);
@@ -180,6 +181,7 @@ static void sigsegv(int num)
char cmd[128];
char dump[128];
char exec_file[PATH_MAX];
+ char exec_file_buf[PATH_MAX];
pid_t pid;
FILE *f;
int fd;
@@ -213,7 +215,7 @@ static void sigsegv(int num)
fclose(f);
sprintf(exec_file, "/proc/%s/exe", pid_str);
- readlink(exec_file, exec_file, PATH_MAX);
+ readlink(exec_file, exec_file_buf, PATH_MAX);
execlp("gdb", "gdb", "-x", cmd, exec_file, pid_str, NULL);
perror("exec");