diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-12-24 11:22:25 -0800 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-12-24 11:58:26 -0800 |
commit | 34d90b5390f882d831a648a717cce6fde2cebc2d (patch) | |
tree | 49e6af3acea5d2e8f59f211de15867d41c72df8e /m4 | |
parent | b59fda6fb328dcdf01402e5cd45311c0f93cd259 (diff) | |
download | autoconf-archive-34d90b5390f882d831a648a717cce6fde2cebc2d.tar.gz |
AX_TYPE_SOCKLEN_T: fix "-Wall -Werror" compatibility
The len variable is unused, which causes a compile error resulting in a
failure to detect socklen_t.
Also fix a potential warning about implicit type conversion while
initializing len.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ax_type_socklen_t.m4 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/ax_type_socklen_t.m4 b/m4/ax_type_socklen_t.m4 index 834c4cf..593e669 100644 --- a/m4/ax_type_socklen_t.m4 +++ b/m4/ax_type_socklen_t.m4 @@ -42,7 +42,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 6 AU_ALIAS([TYPE_SOCKLEN_T], [AX_TYPE_SOCKLEN_T]) AC_DEFUN([AX_TYPE_SOCKLEN_T], @@ -51,7 +51,7 @@ AC_DEFUN([AX_TYPE_SOCKLEN_T], AC_TRY_COMPILE( [#include <sys/types.h> #include <sys/socket.h>], - [socklen_t len = 42; return 0;], + [socklen_t len = (socklen_t) 42; return (!len);], ac_cv_ax_type_socklen_t=yes, ac_cv_ax_type_socklen_t=no) ]) |