FreeBSD 13 : wrong kernel version and size of kevent_t

eugene dee0xeed at gmail.com
Sun Dec 19 09:49:29 UTC 2021


test program:

```d
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);
}
```

output:

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

     @bsd:~/d> uname -K
     1300139

/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.



More information about the Digitalmars-d-learn mailing list