:: Re: [devuan-dev] time.h missing LOC…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Chris Quayle
Datum:  
To: devuan developers internal list
Betreff: Re: [devuan-dev] time.h missing LOCK_MONOTONIC
On 12/10/20 22:27, Ralph Ronnquist wrote:
> actually, the command was mistyped so my conclusion is wrong;
> you might have to include<linux/time.h> explicitly
>
> Ralph.


Hi Ralph,

Thanks for the reply. Haven't built much with Linux, but digging a
bit, that's what I found. Actually using FreeBSD 12 for development,
but needed to make sure it would build and run on Linux as well. Just
included <linux/time.h>, which fixed it.

Devuan looks really good and have run Debian in the past, so will be
looking more into it, xfce4 and systemd free...

Chris



>
> On 11/12 09:18, Ralph Ronnquist wrote:
>> Afaict CLOCK_MONOTONIC is defined in<linux/time.h> and<time.h>
>> doesn't include<linux/time.h> unless some "configuration defines are
>> used, e.g. __USE_POSIX or __USE_MISC
>>
>> As you might know, one can explore things with the -E option
>> (pre-process only) for gcc, for example:
>>
>> $ echo "define __USE_XOPEN\n#include<linux/time.h>" | gcc -E - | grep time.h
>>
>> would tell that /usr/include/linux/time.h is included when __USE_XOPEN
>> is defined.
>>
>> Ralph.
>>
>> On 09/12 18:58, aero wrote:
>>> Hi
>>>
>>> Recently installed the current version and am trying to build an ntp network
>>> utility. This calls clock_gettime() with
>>> the CLOCK_MONOTONIC qualifier. Make drops can't find this, even though
>>> time.h is included. Have searched around the tree, but no sign of this
>>> qualifier.
>>>
>>> I'm using the gnu make, gcc and binutils added packages for this as the
>>> default toolset.
>>>
>>> Had to make a few Makefile changes for Linux, but the code builds and runs
>>> fine under FreeBSD-12 and Solaris 10, X86 and Sparc. Wonder what i'm missing
>>> here ?...
>>>
>>> Regards,
>>>
>>> Chris
>>> _______________________________________________
>>> devuan-dev internal mailing list
>>> devuan-dev@???
>>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/devuan-dev
> _______________________________________________
> devuan-dev internal mailing list
> devuan-dev@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/devuan-dev