projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git]
/
src
/
string
/
strerror_r.c
1
#include <string.h>
2
#include <errno.h>
3
4
int strerror_r(int err, char *buf, size_t buflen)
5
{
6
char *msg = strerror(err);
7
if (strlen(msg) >= buflen)
8
return ERANGE;
9
strcpy(buf, msg);
10
return 0;
11
}