[libcamera-devel] [PATCH] libcamera: Don't unnecessarily include event_notifier.h

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Sep 20 15:43:56 CEST 2020


The ipc_unixsocket.h and process.h internal headers don't need to
include event_notifier.h, the former because a forward declaration
suffices, and the latter because it doesn't use event notifiers. Remove
the unnecessary include, and include signal.h instead which is required
and was included indirectly through event_notifier.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 include/libcamera/internal/ipc_unixsocket.h | 4 +++-
 include/libcamera/internal/process.h        | 2 +-
 src/libcamera/ipc_unixsocket.cpp            | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
index 9dcaaa26956d..e871b65036bd 100644
--- a/include/libcamera/internal/ipc_unixsocket.h
+++ b/include/libcamera/internal/ipc_unixsocket.h
@@ -12,10 +12,12 @@
 #include <sys/types.h>
 #include <vector>
 
-#include <libcamera/event_notifier.h>
+#include <libcamera/signal.h>
 
 namespace libcamera {
 
+class EventNotifier;
+
 class IPCUnixSocket
 {
 public:
diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index 36595106f3b9..2688557cb8e2 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -10,7 +10,7 @@
 #include <string>
 #include <vector>
 
-#include <libcamera/event_notifier.h>
+#include <libcamera/signal.h>
 
 namespace libcamera {
 
diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
index 701b2c518217..5c8cce16200e 100644
--- a/src/libcamera/ipc_unixsocket.cpp
+++ b/src/libcamera/ipc_unixsocket.cpp
@@ -12,6 +12,8 @@
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include <libcamera/event_notifier.h>
+
 #include "libcamera/internal/log.h"
 
 /**
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list