[MacPorts] #68308: legacy-support clock update resulted in a bug: /opt/local/include/LegacySupport/time.h:83:27: error: unknown type name 'clockid_t'; did you mean 'clock_id_t'?
MacPorts
noreply at macports.org
Sun Oct 1 10:45:56 UTC 2023
#68308: legacy-support clock update resulted in a bug:
/opt/local/include/LegacySupport/time.h:83:27: error: unknown type name
'clockid_t'; did you mean 'clock_id_t'?
-----------------------------+----------------------
Reporter: barracuda156 | Owner: catap
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: legacy-support |
-----------------------------+----------------------
Comment (by barracuda156):
If I change:
{{{
#define CLOCK_MONOTONIC (1)
#define CLOCK_REALTIME (2)
#include <mach/clock.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <sys/errno.h>
#include <sys/time.h>
}}}
to:
{{{
#include <mach/clock.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <sys/errno.h>
#include <sys/time.h>
#define CLOCK_MONOTONIC (1)
#define CLOCK_REALTIME (2)
}}}
the port builds, but complains:
{{{
/opt/local/bin/gcc-mp-12
-I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-isystem/opt/local/include/LegacySupport -I/opt/local/include -DNO_CGI
-DNO_FILES -DARCH_IS_BIG_ENDIAN=1 -fPIC -pipe -Os -arch ppc -c
civetweb.c -o civetweb.o
civetweb.c:370: warning: "CLOCK_MONOTONIC" redefined
370 | #define CLOCK_MONOTONIC (1)
|
In file included from /usr/include/sys/time.h:197,
from /opt/local/include/LegacySupport/sys/time.h:25,
from civetweb.c:368:
/opt/local/include/LegacySupport/time.h:55: note: this is the location of
the previous definition
55 | #define CLOCK_MONOTONIC 6
|
civetweb.c:371: warning: "CLOCK_REALTIME" redefined
371 | #define CLOCK_REALTIME (2)
|
/opt/local/include/LegacySupport/time.h:52: note: this is the location of
the previous definition
52 | #define CLOCK_REALTIME 0
|
}}}
Finally, if I do this:
{{{
#include <mach/clock.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <sys/errno.h>
#include <sys/time.h>
#undef CLOCK_MONOTONIC
#undef CLOCK_REALTIME
#define CLOCK_MONOTONIC (1)
#define CLOCK_REALTIME (2)
}}}
it builds cleanly, but I am not sure this is the right thing to do :)
--
Ticket URL: <https://trac.macports.org/ticket/68308#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list