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 <richardcochran@gmail.com>
master
Richard Cochran 2017-11-25 11:01:39 -08:00
parent 99fd084253
commit ae28894814
2 changed files with 2 additions and 2 deletions

2
msg.c
View File

@ -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.
*/

View File

@ -36,8 +36,6 @@
#include "util.h"
#include "version.h"
int assume_two_step = 0;
static void usage(char *progname)
{
fprintf(stderr,