[Cake] gcc 7.3.1 issue on arch

Bret Towe bret.towe at gmail.com
Wed Mar 28 18:30:15 EDT 2018

for anyone seeing a compile error like the below on Arch Linux

  CC [M]  /root/sch_cake/sch_cake.o
In file included from ./include/linux/list.h:9:0,
                 from ./include/linux/module.h:9,
                 from /root/sch_cake/sch_cake.c:42:
./include/linux/kernel.h:6:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
compilation terminated.

the workaround is below

diff --git a/Makefile b/Makefile
index 2c473e3..428ffbf 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ obj-m := sch_cake.o
 KERNEL_VERSION := $(shell uname -r)
 IDIR := /lib/modules/$(KERNEL_VERSION)/kernel/net/sched/
 KDIR := /lib/modules/$(KERNEL_VERSION)/build
 PWD := $(shell pwd)
 VERSION := $(shell git rev-parse HEAD 2>/dev/null)

More information about the Cake mailing list