[Bug 259925] graphics/cairo: rror: implicit declaration of function 'sched_getaffinity' is invalid in C99

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 18 Nov 2021 20:19:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259925

            Bug ID: 259925
           Summary: graphics/cairo: rror: implicit declaration of function
                    'sched_getaffinity' is invalid in C99
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: desktop@FreeBSD.org
          Reporter: ohartmann@walstatt.org
             Flags: maintainer-feedback?(desktop@FreeBSD.org)
          Assignee: desktop@FreeBSD.org

On CURRENT, FreeBSD 14.0-CURRENT #6 main-n250822-4fdc5b8494b4: Thu Nov 18
06:00:15 CET 2021 amd64, port graphics/cairo fails to build to to the error
shown below:

[...]
/bin/sh ../libtool  --tag=CC    --mode=link cc  -O2 -pipe 
-fstack-protector-strong -fno-strict-aliasing   -fstack-protector-strong -o
libcairoperf.la  cairo-perf.lo cairo-perf-report.lo cairo-stats.lo
cairo-time.lo    -lrt  -lm
libtool: link: ar cru .libs/libcairoperf.a .libs/cairo-perf.o
.libs/cairo-perf-report.o .libs/cairo-stats.o .libs/cairo-time.o 
libtool: link: ranlib .libs/libcairoperf.a
libtool: link: ( cd ".libs" && rm -f "libcairoperf.la" && ln -s
"../libcairoperf.la" "libcairoperf.la" )
--- cairo-analyse-trace ---
--- cairo-perf-micro.o ---
cairo-perf-micro.c:418:5: error: unknown type name 'cpu_set_t'; did you mean
'cpusetid_t'?
    cpu_set_t affinity;
    ^~~~~~~~~
    cpusetid_t
/usr/include/sys/types.h:86:22: note: 'cpusetid_t' declared here
typedef __cpusetid_t    cpusetid_t;
                        ^
cairo-perf-micro.c:421:9: error: implicit declaration of function
'sched_getaffinity' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (sched_getaffinity(0, sizeof(affinity), &affinity)) {
        ^
cairo-perf-micro.c:426:35: error: use of undeclared identifier 'CPU_SETSIZE'
    for(i = 0, cpu_count = 0; i < CPU_SETSIZE; ++i) {
                                  ^
cairo-perf-micro.c:427:6: error: implicit declaration of function 'CPU_ISSET'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (CPU_ISSET(i, &affinity))
            ^
--- cairo-analyse-trace ---

-- 
You are receiving this mail because:
You are the assignee for the bug.