Skip to contentSkip to conversation

cobalt/kernel: fix clock_adjtime() compile error

PATCH Applied Henning Schild 2 participants 3 messages Mar 2, 2018 – Mar 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cobalt/kernel: fix clock_adjtime() compile error

Moving the definition out of the ifdef solves the following error:

include/xenomai/cobalt/kernel/clock.h:260:16: error:
‘struct <anonymous>’ has no member named ‘adjust_time’
include/xenomai/cobalt/kernel/clock.h:263:19: error:
‘struct <anonymous>’ has no member named ‘adjust_time’

---
 include/cobalt/kernel/clock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/cobalt/kernel/clock.h +2 -2
index bf03c5921..bbdec9357 100644
@@ -53,8 +53,6 @@ struct xnclock {
 		xnticks_t (*read_monotonic)(struct xnclock *clock);
 		int (*set_time)(struct xnclock *clock,
 				const struct timespec *ts);
-		int (*adjust_time)(struct xnclock *clock,
-				   struct timex *tx);
 		xnsticks_t (*ns_to_ticks)(struct xnclock *clock,
 					  xnsticks_t ns);
 		xnsticks_t (*ticks_to_ns)(struct xnclock *clock,
@@ -66,6 +64,8 @@ struct xnclock {
 		void (*program_remote_shot)(struct xnclock *clock,
 					    struct xnsched *sched);
 #endif
+		int (*adjust_time)(struct xnclock *clock,
+				   struct timex *tx);
 		int (*set_gravity)(struct xnclock *clock,
 				   const struct xnclock_gravity *p);
 		void (*reset_gravity)(struct xnclock *clock);
Signature · 1 line
2.16.1
#1 lore raw

Applies on top of current "next".

Henning

Am Fri, 2 Mar 2018 14:22:05 +0100
schrieb Henning Schild <[email protected]>:

Quoted 34 lines

Moving the definition out of the ifdef solves the following error:

include/xenomai/cobalt/kernel/clock.h:260:16: error:
‘struct <anonymous>’ has no member named ‘adjust_time’
include/xenomai/cobalt/kernel/clock.h:263:19: error:
‘struct <anonymous>’ has no member named ‘adjust_time’

---
 include/cobalt/kernel/clock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/include/cobalt/kernel/clock.h index bf03c5921..bbdec9357 100644

include/cobalt/kernel/clock.h +2 -2
@@ -53,8 +53,6 @@ struct xnclock {
 		xnticks_t (*read_monotonic)(struct xnclock *clock);
 		int (*set_time)(struct xnclock *clock,
 				const struct timespec *ts);
-		int (*adjust_time)(struct xnclock *clock,
-				   struct timex *tx);
 		xnsticks_t (*ns_to_ticks)(struct xnclock *clock,
 					  xnsticks_t ns);
 		xnsticks_t (*ticks_to_ns)(struct xnclock *clock,
@@ -66,6 +64,8 @@ struct xnclock {
 		void (*program_remote_shot)(struct xnclock *clock,
 					    struct xnsched *sched);
 #endif
+		int (*adjust_time)(struct xnclock *clock,
+				   struct timex *tx);
 		int (*set_gravity)(struct xnclock *clock,
 				   const struct xnclock_gravity *p);
 		void (*reset_gravity)(struct xnclock *clock);
#2 lore raw
In reply to Henning Schild
Quoted 27 lines · Henning Schild

Moving the definition out of the ifdef solves the following error:

include/xenomai/cobalt/kernel/clock.h:260:16: error:
‘struct <anonymous>’ has no member named ‘adjust_time’
include/xenomai/cobalt/kernel/clock.h:263:19: error:
‘struct <anonymous>’ has no member named ‘adjust_time’

---
 include/cobalt/kernel/clock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/cobalt/kernel/clock.h +0 -2
index bf03c5921..bbdec9357 100644
@@ -53,8 +53,6 @@ struct xnclock {
 		xnticks_t (*read_monotonic)(struct xnclock *clock);
 		int (*set_time)(struct xnclock *clock,
 				const struct timespec *ts);
-		int (*adjust_time)(struct xnclock *clock,
-				   struct timex *tx);
 		xnsticks_t (*ns_to_ticks)(struct xnclock *clock,
 					  xnsticks_t ns);
 		xnsticks_t (*ticks_to_ns)(struct xnclock *clock,

include/cobalt/kernel/clock.h struct xnclock { · line 71

Quoted 8 lines
include/cobalt/kernel/clock.h +2 -0
@@ -66,6 +64,8 @@ struct xnclock {
 		void (*program_remote_shot)(struct xnclock *clock,
 					    struct xnsched *sched);
 #endif
+		int (*adjust_time)(struct xnclock *clock,
+				   struct timex *tx);
 		int (*set_gravity)(struct xnclock *clock,
 				   const struct xnclock_gravity *p);
 		void (*reset_gravity)(struct xnclock *clock);

Merged, thanks.

Signature · 1 line
Philippe.