From ae28894814fd84d97e2c04acacb8c0e1f7642891 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sat, 25 Nov 2017 11:01:39 -0800 Subject: [PATCH] msg: Share a static global more globally. Any code that wants to call one_step() needs to link with the static global 'assume_two_step'. This patch moves that variable's definition from ptp4l.c to msg.c. Not only is that file the more natural choice (since the variable is used on msg.h) but also this allows other programs to call the one_step() function. Signed-off-by: Richard Cochran --- msg.c | 2 ++ ptp4l.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msg.c b/msg.c index 4b3d926..6943431 100644 --- a/msg.c +++ b/msg.c @@ -32,6 +32,8 @@ #define VERSION_MASK 0x0f #define VERSION 0x02 +int assume_two_step = 0; + /* * Head room fits a VLAN Ethernet header, and 'msg' is 64 bit aligned. */ diff --git a/ptp4l.c b/ptp4l.c index f01ff6f..ee31718 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -36,8 +36,6 @@ #include "util.h" #include "version.h" -int assume_two_step = 0; - static void usage(char *progname) { fprintf(stderr,