summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-11-19 23:25:45 +1100
committerAndreas Schneider <asn@samba.org>2012-11-22 10:21:16 +0100
commitc704f0daa5e81911ea2b507323b5005303f61e91 (patch)
treefa3cf1f19a450e9d53f43f3818af9b46855b374a /lib
parent831a9f8f6dc7057855b75128bf14ed9d4a03ab26 (diff)
downloadsamba-c704f0daa5e81911ea2b507323b5005303f61e91.tar.gz
samba-c704f0daa5e81911ea2b507323b5005303f61e91.tar.bz2
samba-c704f0daa5e81911ea2b507323b5005303f61e91.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/replace.c2
-rw-r--r--lib/replace/replace.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 7ee5f4bc1e..f37d69f365 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -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);
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index cb412c273d..4cdc362b6a 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -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