1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets this

Currently, we put strerror_r into libreplace even on systems with strerror_r.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Andrew Bartlett 2012-11-19 23:25:45 +11:00 committed by Andreas Schneider
parent 831a9f8f6d
commit c704f0daa5
2 changed files with 2 additions and 4 deletions

View File

@ -785,7 +785,7 @@ char *rep_get_current_dir_name(void)
}
#endif
#if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE)
#if !defined(HAVE_STRERROR_R) && !defined(strerror_r)
int rep_strerror_r(int errnum, char *buf, size_t buflen)
{
char *s = strerror(errnum);

View File

@ -570,9 +570,7 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
char *rep_get_current_dir_name(void);
#endif
#if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE)
#undef strerror_r
#define strerror_r rep_strerror_r
#if !defined(HAVE_STRERROR_R) && !defined(strerror_r)
int rep_strerror_r(int errnum, char *buf, size_t buflen);
#endif