Skip to content
Snippets Groups Projects
Commit 3fc80e18 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

hack around glibc header mess for strerror_r

parent 320388c4
No related branches found
No related tags found
No related merge requests found
#include <string.h>
#include <sys/types.h>
#include <errno.h> #include <errno.h>
/*
* Glibc provides two incompatible versions of strerror_r and uses
* redirection magic for the XPG compliants ones in <string.h>,
* so we must avoid including that header as long as we use the glibc
* headers instead of the musl ones.
*/
extern char *strerror (int);
extern size_t strlen (const char *);
extern void *memcpy (void *__restrict, const void *__restrict, size_t);
int strerror_r(int err, char *buf, size_t buflen) int strerror_r(int err, char *buf, size_t buflen)
{ {
char *msg = strerror(err); char *msg = strerror(err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment