Skip to content

w: Fix errors when compile with musl

Chao Liu requested to merge (removed):SuperSix-master-patch-69644 into master

__UT_NAMESIZE is undeclared in musl, which cause:

ocps/4.0.2-r0/recipe-sysroot-native= -c -o src/w.o ../procps-ng-4.0.2/src/w.c | ../procps-ng-4.0.2/src/w.c: In function 'print_from': | ../procps-ng-4.0.2/src/w.c:70:22: error: '__UT_HOSTSIZE' undeclared (first use in this function); did you mean 'UT_HOSTSIZE'? | 70 | # define UT_HOSTSIZE __UT_HOSTSIZE | | ^~~~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c:230:43: note: in expansion of macro 'UT_HOSTSIZE' | 230 | print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len); | | ^~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c:70:22: note: each undeclared identifier is reported only once for each function it appears in | 70 | # define UT_HOSTSIZE __UT_HOSTSIZE | | ^~~~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c:230:43: note: in expansion of macro 'UT_HOSTSIZE' | 230 | print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len); | | ^~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c: In function 'find_best_proc': | ../procps-ng-4.0.2/src/w.c:72:22: error: '__UT_NAMESIZE' undeclared (first use in this function); did you mean 'UT_NAMESIZE'? | 72 | # define UT_NAMESIZE __UT_NAMESIZE | | ^~~~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c:391:18: note: in expansion of macro 'UT_NAMESIZE' | 391 | char buf[UT_NAMESIZE + 1]; | | ^~~~~~~~~~~ | ../procps-ng-4.0.2/src/w.c: In function 'showinfo': | ../procps-ng-4.0.2/src/w.c:72:22: error: '__UT_NAMESIZE' undeclared (first use in this function); did you mean 'UT_NAMESIZE'? | 72 | # define UT_NAMESIZE __UT_NAMESIZE

Merge request reports