From: Andrew Waterman Date: Sat, 10 Jan 2015 01:41:43 +0000 (-0800) Subject: Use PATH_MAX instead of NAME_MAX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b029a9c67b345bb1133e8e33dee6bb5c42558478;p=riscv-isa-sim.git Use PATH_MAX instead of NAME_MAX --- diff --git a/spike_main/xspike.cc b/spike_main/xspike.cc index 4331dbe..f8c8ca7 100644 --- a/spike_main/xspike.cc +++ b/spike_main/xspike.cc @@ -90,7 +90,7 @@ static pid_t fork_xterm(int* tty_fd) return -1; } - char tty[NAME_MAX]; + char tty[PATH_MAX]; ssize_t ttylen = read(fds[0], tty, sizeof(tty)); if (ttylen <= 1 || tty[ttylen-1] != '\n') return -1;