Mercurial > hg > octave-lojdl > gnulib-hg
changeset 14851:e9cc9d33a1b8
strerror_r: fix includes for FreeBSD
* lib/strerror_r.c (includes): Use <stdlib.h> unconditionally,
since we use abort on some platforms.
Reported by Matthias Bolte.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Wed, 01 Jun 2011 08:14:34 -0600 |
parents | 002585582bf6 |
children | b88eb8c00c28 |
files | ChangeLog lib/strerror_r.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-06-01 Eric Blake <eblake@redhat.com> + + strerror_r: fix includes for FreeBSD + * lib/strerror_r.c (includes): Use <stdlib.h> unconditionally, + since we use abort on some platforms. + Reported by Matthias Bolte. + 2011-05-31 Bruno Haible <bruno@clisp.org> Fix link errors in tests: openat-die uses gettext-h.
--- a/lib/strerror_r.c +++ b/lib/strerror_r.c @@ -27,6 +27,7 @@ #include <errno.h> #include <stdio.h> +#include <stdlib.h> #if GNULIB_defined_ESOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H @@ -82,9 +83,6 @@ extern int sys_nerr; # endif -/* Get sys_nerr, sys_errlist on native Windows. */ -# include <stdlib.h> - # else # include "glthread/lock.h"