fix: implicit-int error in EXPORT_SYMBOL_GPL
authorDaniel Gomez <daniel@qtec.com>
Fri, 8 Oct 2021 17:38:02 +0000 (19:38 +0200)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Oct 2021 18:38:34 +0000 (14:38 -0400)
Add module header to fix error:
error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
[-Werror=implicit-int]

Log:
/workdir/build/workspace/sources/lttng-modules/src/wrapper/random.c:54:1:
warning: data definition has no type or storage class
   54 EXPORT_SYMBOL_GPL(wrapper_get_bootid);
      ^~~~~~~~~~~~~~~~~
/workdir/build/workspace/sources/lttng-modules/src/wrapper/random.c:54:1:
error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
[-Werror=implicit-int]
/workdir/build/workspace/sources/lttng-modules/src/wrapper/random.c:54:1:
warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors
make[3]: ***
[/workdir/build/tmp/work-shared/qt5222/kernel-source/scripts/Makefile.build:271:
/workdir/build/workspace/sources/lttng-modules/src/wrapper/random.o]

Signed-off-by: Daniel Gomez <daniel@qtec.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: If1b96f6fcc19988b94dc09b12d071f2c61491b83

src/wrapper/random.c

index 7a81bea60e588ed99d657131cfe00b50df8b55db..0c20815df7f4b343c5f03d8b06d9294f44055e43 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/module.h>
 
 /* boot_id depends on sysctl */
 #if defined(CONFIG_SYSCTL)
This page took 0.026512 seconds and 4 git commands to generate.