Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Linux Kernel how to import LIST_HEAD_INIT

$
0
0

I am using the source code from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git .

The absolute path of my file is /home/user/repos/linux/drivers/infiniband/hw/irdma/test_pble.c .

The file contains the following code.

#include "pble.c"#include "list.h"int main(void) {    struct irdma_pble_prm first = {        .clist = LIST_HEAD_INIT{first.clist};}

LIST_HEAD_INIT is declared in /home/user/repos/linux/include/linux/list.h .My IDE CLion gives me the following warning: Use of undeclared identifier 'LIST_HEAD_INIT'.How can I correctly import the macro LIST_HEAD_INIT?


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>