Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/2] connector: fix #include <linux/cn_proc.h>
@ 2024-01-23 10:14 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2024-01-23 10:14 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni; +Cc: netdev

Including <linux/cn_proc.h> first line doesn't work because of missing
forward declaration:

In file included from kernel/foo.c:1:
include/linux/cn_proc.h:32:47: error: ‘struct task_struct’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
   32 | static inline void proc_fork_connector(struct task_struct *task)
      |                                               ^~~~~~~~~~~

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/cn_proc.h | 2 ++
 1 file changed, 2 insertions(+)

--- a/include/linux/cn_proc.h
+++ b/include/linux/cn_proc.h
@@ -19,6 +19,8 @@
 
 #include <uapi/linux/cn_proc.h>
 
+struct task_struct;
+
 #ifdef CONFIG_PROC_EVENTS
 void proc_fork_connector(struct task_struct *task);
 void proc_exec_connector(struct task_struct *task);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-23 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 10:14 [PATCH 1/2] connector: fix #include <linux/cn_proc.h> Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox