Skip to content

Commit

Permalink
Merge pull request #205 from thesamesam/clang16-deux
Browse files Browse the repository at this point in the history
configure.ac: Fix -Wint-conversion warnings
  • Loading branch information
robbat2 authored Mar 1, 2023
2 parents e1cabf1 + 5acb1c6 commit 2f984cb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,19 @@ AC_HEADER_TIME

dnl Checks for typedefs, structures, and compiler characteristics.
AC_MSG_CHECKING(whether struct sockaddr_in6 has sin6_scope_id)
AC_TRY_COMPILE([#include <sys/types.h>
#include <netinet/in.h>], [static struct sockaddr_in6 ac_sin6; int ac_size =
sizeof (ac_sin6.sin6_scope_id);], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_SIN6_SCOPE_ID],
AC_TRY_COMPILE([#include <stdint.h>
#include <sys/types.h>
#include <netinet/in.h>], [
static struct sockaddr_in6 ac_sin6;
uint32_t ac_size = sizeof (ac_sin6.sin6_scope_id);
], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_SIN6_SCOPE_ID],
1, [whether struct sockaddr_in6 has sin6_scope_id])],
AC_MSG_RESULT(no))

AC_MSG_CHECKING(whether struct in6_addr has u6_addrXX and defines s6_addrXX)
AC_TRY_COMPILE([#include <netinet/in.h>], [static struct in6_addr in6_u;
int u = in6_u.s6_addr16;], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_IN6_ADDR_S6_ADDR],
AC_TRY_COMPILE([#include <stdint.h>
#include <netinet/in.h>], [static struct in6_addr in6_u;
uint16_t u = in6_u.s6_addr16[0];], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_IN6_ADDR_S6_ADDR],
1, [whether struct in6_addr has u6_addrXX and defines s6_addrXX])],
AC_MSG_RESULT(no))

Expand Down

0 comments on commit 2f984cb

Please sign in to comment.