]> git.ipfire.org Git - thirdparty/asterisk.git/commit
configure: fix test code to match gethostbyname_r prototype. (#75)
authorJaco Kroon <jaco@uls.co.za>
Mon, 15 May 2023 12:50:36 +0000 (14:50 +0200)
committerGitHub <noreply@github.com>
Mon, 15 May 2023 12:50:36 +0000 (06:50 -0600)
commit0e6295128c605f1cf41d897c53e6e23e893a6ffa
tree3613e6a5af405adb094bed6727a27076d847ab1b
parentae6b56e357c79b9234a2d86f07ba96ac79485f59
configure: fix test code to match gethostbyname_r prototype. (#75)

This enables the test to work with CC=clang.

Without this the test for 6 args would fail with:

utils.c:99:12: error: static declaration of 'gethostbyname_r' follows non-static declaration
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
           ^
/usr/include/netdb.h:177:12: note: previous declaration is here
extern int gethostbyname_r (const char *__restrict __name,
           ^

Fixing the expected return type to int sorts this out.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
configure
configure.ac