openssh: error: dereferencing pointer to incomplete type 'struct utmpx'
Found on ppc64:
...
==> openssh: Executing phase: 'build' [98/1746]
==> Error: ProcessError: Command exited with status 2:
'make' '-j16' 'V=1'
8 errors found in build log:
2361 set_utmpx_time(struct logininfo *li, struct utmpx *utx)
2362 ^~~~~
2363 loginrec.c:742:46: warning: 'struct utmpx' declared inside parameter list will not be visible outside of this definition o
r declaration
2364 construct_utmpx(struct logininfo *li, struct utmpx *utx)
2365 ^~~~~
2366 loginrec.c: In function 'construct_utmpx':
>> 2367 loginrec.c:747:27: error: dereferencing pointer to incomplete type 'struct utmpx'
2368 memset(utx, '\0', sizeof(*utx));
2369 ^~~~
>> 2370 loginrec.c:756:18: error: 'USER_PROCESS' undeclared (first use in this function); did you mean 'EINPROGRESS'?
2371 utx->ut_type = USER_PROCESS;
2372 ^~~~~~~~~~~~
2373 EINPROGRESS
2374 loginrec.c:756:18: note: each undeclared identifier is reported only once for each function it appears in
>> 2375 loginrec.c:759:18: error: 'DEAD_PROCESS' undeclared (first use in this function); did you mean 'EAI_INPROGRESS'?
2376 utx->ut_type = DEAD_PROCESS;
2377 ^~~~~~~~~~~~
2378 EAI_INPROGRESS
2379 loginrec.c:763:21: warning: passing argument 2 of 'set_utmpx_time' from incompatible pointer type [-Wincompatible-pointer-
types]
2380 set_utmpx_time(li, utx);
2381 ^~~
...
2397 getline
2398 loginrec.c:1008:2: warning: implicit declaration of function 'endutxent'; did you mean 'endspent'? [-Wimplicit-function-de
claration]
2399 endutxent();
2400 ^~~~~~~~~
2401 endspent
2402 loginrec.c: In function 'utmpx_perform_login':
>> 2403 loginrec.c:1027:15: error: storage size of 'utx' isn't known
2404 struct utmpx utx;
2405 ^~~
2406 loginrec.c:1027:15: warning: unused variable 'utx' [-Wunused-variable]
2407 loginrec.c: In function 'utmpx_perform_logout':
>> 2408 loginrec.c:1048:15: error: storage size of 'utx' isn't known
2409 struct utmpx utx;
2410 ^~~
2411 loginrec.c:1048:15: warning: unused variable 'utx' [-Wunused-variable]
2412 loginrec.c: In function 'record_failed_login':
>> 2413 loginrec.c:1666:14: error: storage size of 'ut' isn't known
2414 struct utmp ut;
2415 ^~
>> 2416 loginrec.c:1699:15: error: 'LOGIN_PROCESS' undeclared (first use in this function); did you mean 'EINPROGRESS'?
2417 ut.ut_type = LOGIN_PROCESS;
2418 ^~~~~~~~~~~~~
2419 EINPROGRESS
2420 loginrec.c:1670:23: warning: unused variable 'a6' [-Wunused-variable]
2421 struct sockaddr_in6 *a6;
2422 ^~
2423 loginrec.c:1666:14: warning: unused variable 'ut' [-Wunused-variable]
2424 struct utmp ut;
2425 ^~
>> 2426 make: *** [Makefile:199: loginrec.o] Error 1
2427 make: *** Waiting for unfinished jobs....
2428 In file included from includes.h:87,
2429 from sandbox-systrace.c:18:
...