www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22615] New: Wrong OS version and struct kevent_t in FreeBSD 13


          Issue ID: 22615
           Summary: Wrong OS version and struct kevent_t in FreeBSD 13
           Product: D
           Version: D2
          Hardware: x86_64
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dee0xeed gmail.com

test program:

import std.stdio;
import core.sys.freebsd.config;
import core.sys.freebsd.sys.event;

void main(string[] args) {
    writefln("FreeBSD_version = %s", __FreeBSD_version);
    writefln("sizeof(kevent_t) = %s", kevent_t.sizeof);


 bsd:~/d> ./freebsdver
FreeBSD_version = 1104000
sizeof(kevent_t) = 32

actual version

 bsd:~/d> uname -K


/usr/include/d/dmd/core/sys/freebsd/sys/event.h do contain correct definition
of kevent_t for versions 12+ (with ulong[4] ext field), but because of wrong
kernel version size of kevent_t is also incorrect.

Dec 21 2021