[Live-devel] Warning fix in the DelayQueue.hh file on MacOS 26

Eric Beuque eric.beuque at seek-one.fr
Mon Mar 9 03:22:59 PDT 2026


I got a fix in the BasicUsageEnvironment/DelayQueue.hh file, in the Timeval
constructor.

*implicit conversion loses integer precision: 'time_base_seconds' (aka
'long') to '__darwin_suseconds_t' (aka 'int')*
This is because on MacOS, time.usec is type of __darwin_suseconds_t which
is int.

  Timeval(time_base_seconds seconds, time_base_seconds useconds) {
    fTv.tv_sec = seconds; fTv.tv_usec = useconds;
  }

I suggest to add a definition just above the constructor.

#ifdef _APPLE_
typedef time_base_seconds time_base_useconds;
#else
typedef __darwin_suseconds_t time_base_useconds;
#endif

and modify :

  Timeval(time_base_seconds seconds, time_base_seconds useconds) {
    fTv.tv_sec = seconds; fTv.tv_usec = (time_base_useconds)useconds;
  }

Regards

Eric BEUQUE - Software architect / developer

T. 03 81 51 90 99 | www.seek-one.fr

6B rue Christiaan Huyguens 25000 BESANCON
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20260309/d8845525/attachment.htm>


More information about the live-devel mailing list