FreeBSD 13 : wrong kernel version and size of kevent_t

Steven Schveighoffer schveiguy at gmail.com
Tue Dec 21 19:49:26 UTC 2021


On 12/21/21 2:32 PM, eugene wrote:
> On Tuesday, 21 December 2021 at 19:13:19 UTC, Steven Schveighoffer wrote:
>> On 12/21/21 1:50 PM, eugene wrote:
>>> ```d
>>>      version (FreeBSD_12) enum __FreeBSD_version = 1202000;
>>> else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
>>> else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
>>> else version (FreeBSD_9)  enum __FreeBSD_version = 903000;
>>> else version (FreeBSD_8)  enum __FreeBSD_version = 804000;
>>> else static assert(false, "Unsupported version of FreeBSD");
>>> ```
>>>
>>> but __FreeBSD_version is 1104000 anyway.
>>
>> Not sure how those versions are set. I have a hard time following the 
>> dmd code to see where it might check the current-running OS to check 
>> for the version.
> 
> I think, it'd be nice to set it in /etc/dmd.conf
> Or.. is it bad idea?..
> 

If this is a compiler-supplied version, then I don't think you are 
allowed to set it explicitly.

-Steve


More information about the Digitalmars-d-learn mailing list