#66545 closed defect (fixed)

wmcpuload @1.0.1: error: implicit declaration of function 'host_statistics' is invalid in C99

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: ventura Cc:
Port: wmcpuload

Description

https://build.macports.org/builders/ports-13_x86_64-builder/builds/5832/steps/install-port/logs/stdio

cpu_darwin.c:29:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
getload(host_cpu_load_info_t cpucounters)
^
cpu_darwin.c:34:10: error: implicit declaration of function 'host_statistics' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    kr = host_statistics (host_priv_port, HOST_CPU_LOAD_INFO, (host_info_t) cpucounters, &count);
         ^
cpu_darwin.c:41:22: error: implicit declaration of function 'mach_host_self' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    host_priv_port = mach_host_self();
                     ^
1 warning and 2 errors generated.

Change History (1)

comment:1 Changed 22 months ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 62db0b8b5fec1272452f719d4dfa8813bdf26c04/macports-ports (master):

wmcpuload: use newer header for host_statistics

fixes build on newer systems
closes: #66545

Note: See TracTickets for help on using tickets.