やるきなし

2017/11/16 14:57 / broadcom-sta if.h: fatal error: sys/socket.h: No such file or directory

broadcom-sta-dkms (6.30.223.271-7) の compile に以下の通り fail する.

[/var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log] 抜粋
Kernel architecture is X86_64
  AR      /var/lib/dkms/broadcom-sta/6.30.223.271/build/built-in.o
  CC [M]  /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
In file included from ./include/linux/compat.h:17:0,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:41,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/include/linuxver.h:69,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:25:
./include/linux/if.h:28:10: fatal error: sys/socket.h: No such file or directory
 #include <sys/socket.h>   /* for struct sockaddr.  */
          ^~~~~~~~~~~~~~
compilation terminated.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862175 にあるとおりinclude/uapi/linux/if.hが使われるべきで,include/linux/if.hは存在しないべき(?)だそう.include/uapi/linux/if.hが存在すれば /usr/src/linux-headers-<version>/include/linux/if.h を削除してしまえば解決する.