1
1

* so apparently Linux has a lame old strerror_r that has a different

prototype than everyone else.  It's only active if _GNU_SOURCE is
  definted, which of course we have to have defined for asprintf.
  So just use strerror() underneath

This commit was SVN r7002.
Этот коммит содержится в:
Brian Barrett 2005-08-24 13:44:57 +00:00
родитель c2387ca74e
Коммит 440a95b808

Просмотреть файл

@ -96,7 +96,9 @@ opal_strerror_r(int errnum, char *strerrbuf, size_t buflen)
if (NULL == errmsg) {
if (errnum == OPAL_ERR_IN_ERRNO) {
return strerror_r(errno, strerrbuf, buflen);
char *tmp = strerror(errno);
strncpy(strerrbuf, tmp, buflen);
return OPAL_SUCCESS;
} else {
errno = EINVAL;
ret = snprintf(strerrbuf, buflen, "Unknown error: %d", errnum);