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 <richardcoch...@gmail.com>
---
 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,
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to