On Friday, 22 April 2022 at 05:28:52 UTC, dangbinghoo wrote:
On Thursday, 21 April 2022 at 07:38:04 UTC, Alexander Zhirov wrote:
[...]

    ```d
    struct ifreq {
        private union ifr_ifrn_ {
                char[IFNAMSIZ] ifrn_name; /* if name, e.g. "en0" */   
        }
        ifr_ifrn_ ifr_ifrn;

[...]

it's actually POSIX C API binding for D. you should get similar code in C when searching StackOverflow.

the only thing to do this is just to look at /usr/include/dlang for POSIX API already complete binding from the official. if something is missing, you just do-it-yourself in your code.

Reply via email to