[Replicant] [libsamsung-ipc] [PATCH 2/5] include: samsung-ipc.h: move include inside the #ifdef/#endif guards

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Mon Feb 1 18:00:47 UTC 2021

This separates more what is part of the header and what is not
so things are more clear to the people reading the code.

In addition, having all includes statements inside the #ifdef #endif
header guards avoids issues with the inclusion of headers that are
missing such guards. This can happen with headers imported from vendor

So while headers imported from vendor kernels are typically not
included in the headers exported by libsamsung-ipc, it's still good
to have a consistent code style between exported and non exported

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
 include/samsung-ipc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/samsung-ipc.h b/include/samsung-ipc.h
index a03c748..3983ea5 100644
--- a/include/samsung-ipc.h
+++ b/include/samsung-ipc.h
@@ -19,11 +19,11 @@
  * along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
-#include <sys/time.h>
 #ifndef __SAMSUNG_IPC_H__
 #define __SAMSUNG_IPC_H__
+#include <sys/time.h>
  * Values

More information about the Replicant mailing list