Build failure on aarch64
Since d965a1a8 was applied, building on aarch64 with gcc fails:
#54 9.783 CC XEVI.lo
#54 9.860 In file included from XEVI.c:34:
#54 9.860 XEVI.c: In function 'XeviGetVisualInfo':
#54 9.860 reallocarray.h:41:41: error: implicit declaration of function 'reallocarray'; did you mean 'Xreallocarray'? [-Werror=implicit-function-declaration]
#54 9.860 41 | # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size))
#54 9.860 | ^~~~~~~~~~~~
#54 9.860 reallocarray.h:44:41: note: in expansion of macro 'Xreallocarray'
#54 9.860 44 | #define Xmallocarray(n, size) Xreallocarray(NULL, (n), (size))
#54 9.860 | ^~~~~~~~~~~~~
#54 9.860 XEVI.c:150:23: note: in expansion of macro 'Xmallocarray'
#54 9.860 150 | temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.860 | ^~~~~~~~~~~~
#54 9.860 reallocarray.h:41:41: warning: nested extern declaration of 'reallocarray' [-Wnested-externs]
#54 9.860 41 | # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size))
#54 9.860 | ^~~~~~~~~~~~
#54 9.860 reallocarray.h:44:41: note: in expansion of macro 'Xreallocarray'
#54 9.860 44 | #define Xmallocarray(n, size) Xreallocarray(NULL, (n), (size))
#54 9.860 | ^~~~~~~~~~~~~
#54 9.860 XEVI.c:150:23: note: in expansion of macro 'Xmallocarray'
#54 9.860 150 | temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.860 | ^~~~~~~~~~~~
#54 9.861 XEVI.c:150:21: warning: assignment to 'VisualID32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
#54 9.861 150 | temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.861 | ^
#54 9.915 CC XLbx.lo
#54 9.956 cc1: some warnings being treated as errors
#54 9.959 make[2]: *** [Makefile:545: XEVI.lo] Error 1
#54 9.959 make[2]: *** Waiting for unfinished jobs....
#54 10.04 make[2]: Leaving directory '/stage/libxext/src'
#54 10.04 make[1]: *** [Makefile:491: all-recursive] Error 1
#54 10.04 make[1]: Leaving directory '/stage/libxext'
#54 10.04 make: *** [Makefile:400: all] Error 2
Adding -D_GNU_SOURCE to CFLAGS fixes the issue. Things build just fine for x86_64 targets, so that flag must be not set on aarch64, or it's somehow getting lost.
Edited by BtbN