Skip to content

os: Fix assignment with incompatible pointer type when building with IPv6 support disabled

Joaquim Monteiro requested to merge jmonteiro/xserver:no-ipv6-fix into master

This MR fixes the following error when building with IPv6 support disabled:

../xwayland-24.1.0/os/access.c: In function ‘siHostnameAddrMatch’:
../xwayland-24.1.0/os/access.c:1879:27: error: assignment to ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 1879 |             for (addrlist = hp->h_addr_list; *addrlist; addrlist++)
      |                           ^

While looking at this, I spotted a possible error in the same function in the case that h_addr isn't defined, so I fixed that in the second commit.

Edited by Joaquim Monteiro

Merge request reports