Skip to content

Commit

Permalink
Properly detect which variant of strerror_r we have
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdm committed Sep 18, 2013
1 parent faacfcb commit 9790cf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ if test "$PHP_MOSQUITTO" != "no"; then
PHP_SUBST(MOSQUITTO_SHARED_LIBADD)

PHP_NEW_EXTENSION(mosquitto, mosquitto.c, $ext_shared)

AC_FUNC_STRERROR_R
fi
2 changes: 1 addition & 1 deletion mosquitto.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ char *strerror_wrapper(int err)
{
char *buf = ecalloc(256, sizeof(char));
POSSIBLY_UNUSED char *bbuf = buf;
#ifdef _GNU_SOURCE
#ifdef STRERROR_R_CHAR_P
bbuf =
#endif
strerror_r(err, buf, 256);
Expand Down

0 comments on commit 9790cf5

Please sign in to comment.