On Sun, 28 Feb 2021 at 20:04, Khem Raj <raj.khem@gmail.com> wrote:

It seems __WORDISIZE is what is being used here, a portable way would be

#include <limits.h>
#if (ULONG_MAX == 0xffffffffffffffff)
64bit wordlen stuff
#else
32bit stuff
#endif

if we still want to keep using internal libc internal define __WORDSIZE
then for musl include sys/user.h headers under bits/ dir are usually not
portable and not meant for direct includes

#include <features.h>
#ifdef __GLIBC__
#include <bits/wordsize.h>
#endif
#include <sys/user.h>

Can you send a patch upstream for this please? I have filed a ticket which you can reference:
https://github.com/rpm-software-management/libdnf/issues/1146

Alex