[MacPorts] #70577: nnn includes a non-existing header: fatal error: sys/_types/_timespec.h: No such file or directory
MacPorts
noreply at macports.org
Sat Aug 17 22:05:49 UTC 2024
#70577: nnn includes a non-existing header: fatal error: sys/_types/_timespec.h: No
such file or directory
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.1
Resolution: | Keywords:
Port: nnn |
---------------------------+--------------------
Comment (by barracuda156):
The correct header may be `sys/stat.h`, but it does not save us, since
there is a conflict between `nnn` fallback for clock_gettime and
legacysupport.
{{{
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_nnn/nnn/work/compwrap/cc/opt/local/bin
/gcc-mp-14 -isystem/opt/local/include/LegacySupport -I/opt/local/include
-DPCRE -DMACOS_BELOW_1012 -Os -arch ppc -std=c11 -Wall -Wextra -Wshadow
-D_DARWIN_C_SOURCE -DNCURSES_WIDECHAR -Wl,-headerpad_max_install_names
-L/opt/local/lib -lMacportsLegacySupport -arch ppc -o nnn misc/macos-
legacy/mach_gettime.c src/nnn.c -lreadline -lpcre -L/opt/local/lib
-Wl,-search_paths_first -lncurses -lpthread
In file included from src/nnn.c:112:
src/../misc/macos-legacy/mach_gettime.h:14:9: warning: "CLOCK_REALTIME"
redefined
14 | #define CLOCK_REALTIME CALENDAR_CLOCK
| ^~~~~~~~~~~~~~
In file included from /usr/include/sys/time.h:197,
from /opt/local/include/LegacySupport/sys/time.h:27,
from src/nnn.c:52:
/opt/local/include/LegacySupport/time.h:59:9: note: this is the location
of the previous definition
59 | #define CLOCK_REALTIME _CLOCK_REALTIME
| ^~~~~~~~~~~~~~
src/../misc/macos-legacy/mach_gettime.h:15:9: warning: "CLOCK_MONOTONIC"
redefined
15 | #define CLOCK_MONOTONIC SYSTEM_CLOCK
| ^~~~~~~~~~~~~~~
/opt/local/include/LegacySupport/time.h:61:9: note: this is the location
of the previous definition
61 | #define CLOCK_MONOTONIC _CLOCK_MONOTONIC
| ^~~~~~~~~~~~~~~
src/../misc/macos-legacy/mach_gettime.h:17:13: error: conflicting types
for 'clockid_t'; have 'int'
17 | typedef int clockid_t;
| ^~~~~~~~~
/opt/local/include/LegacySupport/time.h:76:3: note: previous declaration
of 'clockid_t' with type 'clockid_t'
76 | } clockid_t;
| ^~~~~~~~~
src/../misc/macos-legacy/mach_gettime.h:21:8: error: redefinition of
'struct timespec'
21 | struct timespec { time_t tv_sec; long tv_nsec; };
| ^~~~~~~~
In file included from /usr/include/sys/stat.h:79,
from /opt/local/include/LegacySupport/sys/stat.h:27,
from src/nnn.c:47:
/usr/include/sys/_structs.h:88:1: note: originally defined here
88 | _STRUCT_TIMESPEC
| ^~~~~~~~~~~~~~~~
src/../misc/macos-legacy/mach_gettime.h:23:5: error: conflicting types for
'clock_gettime'; have 'int(int, struct timespec *)'
23 | int clock_gettime(clockid_t clk_id, struct timespec *tp);
| ^~~~~~~~~~~~~
/opt/local/include/LegacySupport/time.h:80:12: note: previous declaration
of 'clock_gettime' with type 'int(clockid_t, struct timespec *)'
80 | extern int clock_gettime( clockid_t clk_id, struct timespec *ts );
| ^~~~~~~~~~~~~
src/nnn.c: In function 'invertselbuf':
src/nnn.c:1830:58: warning: operand of '?:' changes signedness from 'int'
to 'uint_t' {aka 'unsigned int'} due to unsignedness of other operand
[-Wsign-compare]
1830 | endpos = (i + 1 == nmarked ? selbufpos : marked[i
+ 1].startpos - pselbuf);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nnn.c: In function 'nextsel':
src/nnn.c:3194:63: error: passing argument 6 of 'kevent' from incompatible
pointer type [-Wincompatible-pointer-types]
3194 | event_data, NUM_EVENT_FDS,
>imeout) > 0)
|
^~~~~~~~~
| |
|
struct timespec *
In file included from src/nnn.c:51:
/usr/include/sys/event.h:295:44: note: expected 'const struct timespec *'
but argument is of type 'struct timespec *'
295 | const struct timespec *timeout);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make: *** [nnn] Error 1
}}}
--
Ticket URL: <https://trac.macports.org/ticket/70577#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list