Linux. SOL_NETLINK not defined

前端 未结 1 1148
北荒
北荒 2020-12-21 00:05

I was trying to use SOL_NETLINK in setsockopt in Linux, and got an error saying that SOL_NETLINK is not defined although in included the socket.h file.

Googled for s

相关标签:
1条回答
  • 2020-12-21 01:06

    I just compile-checked this code on a raspbian PI, and it compiles without any warnings.

    #include <sys/socket.h>
    #include <stdio.h>
    
    int main(int argc, char *argv[])
    {
            printf ("SOL_SOCKET=%d\n", SOL_SOCKET);
            return 0;
    }
    
    0 讨论(0)
提交回复
热议问题