[PATCH 13/18] ptpd: Add missing includes for RTEMS
Gabriel Moyano
gabriel.moyano at dlr.de
Wed Apr 12 13:54:17 UTC 2023
---
freebsd/contrib/ptpd/src/constants.h | 4 ++++
freebsd/contrib/ptpd/src/dep/datatypes_dep.h | 7 +++++++
freebsd/contrib/ptpd/src/dep/sys.c | 4 ++++
freebsd/contrib/ptpd/src/ptpd.h | 6 ++++++
freebsd/contrib/ptpd/src/timingdomain.c | 4 ++++
5 files changed, 25 insertions(+)
diff --git a/freebsd/contrib/ptpd/src/constants.h b/freebsd/contrib/ptpd/src/constants.h
index 4bb6d2a6..74ecebba 100644
--- a/freebsd/contrib/ptpd/src/constants.h
+++ b/freebsd/contrib/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/freebsd/contrib/ptpd/src/dep/datatypes_dep.h b/freebsd/contrib/ptpd/src/dep/datatypes_dep.h
index 9496ed60..1f62df03 100644
--- a/freebsd/contrib/ptpd/src/dep/datatypes_dep.h
+++ b/freebsd/contrib/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/freebsd/contrib/ptpd/src/dep/sys.c b/freebsd/contrib/ptpd/src/dep/sys.c
index 6c93bf4c..4f6e544e 100644
--- a/freebsd/contrib/ptpd/src/dep/sys.c
+++ b/freebsd/contrib/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/freebsd/contrib/ptpd/src/ptpd.h b/freebsd/contrib/ptpd/src/ptpd.h
index 387d6525..d8bb4b1e 100644
--- a/freebsd/contrib/ptpd/src/ptpd.h
+++ b/freebsd/contrib/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/freebsd/contrib/ptpd/src/timingdomain.c b/freebsd/contrib/ptpd/src/timingdomain.c
index 706af9ac..38c80678 100644
--- a/freebsd/contrib/ptpd/src/timingdomain.c
+++ b/freebsd/contrib/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