[PATCH v2 13/18] ptpd: Add missing includes for RTEMS

Gabriel Moyano gabriel.moyano at dlr.de
Mon Apr 17 07:59:26 UTC 2023


---
 rtemsbsd/ptpd/src/constants.h         | 4 ++++
 rtemsbsd/ptpd/src/dep/datatypes_dep.h | 7 +++++++
 rtemsbsd/ptpd/src/dep/sys.c           | 4 ++++
 rtemsbsd/ptpd/src/ptpd.h              | 6 ++++++
 rtemsbsd/ptpd/src/timingdomain.c      | 4 ++++
 5 files changed, 25 insertions(+)

diff --git a/rtemsbsd/ptpd/src/constants.h b/rtemsbsd/ptpd/src/constants.h
index 4bb6d2a6..74ecebba 100644
--- a/rtemsbsd/ptpd/src/constants.h
+++ b/rtemsbsd/ptpd/src/constants.h
@@ -1,6 +1,10 @@
 #ifndef CONSTANTS_H_
 #define CONSTANTS_H_
 
+#ifdef __rtems__
+#include <ptpd/config.h>
+#endif /* __rtems__ */
+
 /**
 *\file
 * \brief Default values and constants used in ptpdv2
diff --git a/rtemsbsd/ptpd/src/dep/datatypes_dep.h b/rtemsbsd/ptpd/src/dep/datatypes_dep.h
index 9496ed60..1f62df03 100644
--- a/rtemsbsd/ptpd/src/dep/datatypes_dep.h
+++ b/rtemsbsd/ptpd/src/dep/datatypes_dep.h
@@ -3,6 +3,13 @@
 
 #include "../ptp_primitives.h"
 
+#ifdef __rtems__
+#include <net/ethernet.h>
+#endif /* __rtems__ */
+
+#ifdef HAVE_KQUEUE
+#include <sys/event.h>
+#endif /* HAVE_KQUEUE */
 /**
 *\file
 * \brief Implementation specific datatype
diff --git a/rtemsbsd/ptpd/src/dep/sys.c b/rtemsbsd/ptpd/src/dep/sys.c
index 6c93bf4c..4f6e544e 100644
--- a/rtemsbsd/ptpd/src/dep/sys.c
+++ b/rtemsbsd/ptpd/src/dep/sys.c
@@ -53,6 +53,10 @@
 
 #include "../ptpd.h"
 
+#ifdef __rtems__
+#include <sys/timex.h>
+#endif /* __rtems__ */
+
 #ifdef HAVE_NETINET_ETHER_H
 #  include <netinet/ether.h>
 #endif
diff --git a/rtemsbsd/ptpd/src/ptpd.h b/rtemsbsd/ptpd/src/ptpd.h
index 387d6525..d8bb4b1e 100644
--- a/rtemsbsd/ptpd/src/ptpd.h
+++ b/rtemsbsd/ptpd/src/ptpd.h
@@ -18,10 +18,16 @@
 #ifndef PTPD_H_
 #define PTPD_H_
 
+#ifndef __rtems__
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif /* HAVE_CONFIG_H */
 
+#else /* __rtems__ */
+#include <ptpd/config.h>
+#endif /* __rtems__ */
+
 
 #ifdef linux
 #	ifndef _GNU_SOURCE
diff --git a/rtemsbsd/ptpd/src/timingdomain.c b/rtemsbsd/ptpd/src/timingdomain.c
index 706af9ac..38c80678 100644
--- a/rtemsbsd/ptpd/src/timingdomain.c
+++ b/rtemsbsd/ptpd/src/timingdomain.c
@@ -1,6 +1,10 @@
 #include "ptpd.h"
 #include "dep/ntpengine/ntpdcontrol.h"
 
+#ifdef __rtems__
+#include <sys/timex.h>
+#endif /* __rtems__ */
+
 #ifdef LOCAL_PREFIX
 #undef LOCAL_PREFIX
 #endif
-- 
2.25.1



More information about the devel mailing list