1
Fork 0

Change log buffer butes to a symbolic const in runtime.

This commit is contained in:
Graydon Hoare 2011-01-14 13:41:39 -08:00
parent bdcb9d9b53
commit fe1a4ab23c
5 changed files with 15 additions and 11 deletions

View file

@ -22,14 +22,14 @@ last_os_error(rust_task *task) {
return NULL;
}
#elif defined(_GNU_SOURCE)
char cbuf[1024];
char cbuf[BUF_BYTES];
char *buf = strerror_r(errno, cbuf, sizeof(cbuf));
if (!buf) {
task->fail(1);
return NULL;
}
#else
char buf[1024];
char buf[BUF_BYTES];
int err = strerror_r(errno, buf, sizeof(buf));
if (err) {
task->fail(1);