From 8d35d305b1c276b1d97571bfd14c0512b4d4f2fb Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Fri, 11 Oct 2013 12:05:16 +0200
Subject: [PATCH] ppsi build: don't refer to ptp-noposix headers any more

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
 Makefile             | 5 -----
 shell/cmd_ptrack.c   | 7 ++++++-
 softpll/softpll_ng.c | 1 +
 wrc_main.c           | 1 -
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index faea9de..ca9fb47 100644
--- a/Makefile
+++ b/Makefile
@@ -69,11 +69,6 @@ cflags-$(CONFIG_PPSI) += \
 	-I$(PPSI)/proto-ext-whiterabbit \
 	-Iboards/spec
 
-# FIXME: The following is temporary, until we clean up
-cflags-$(CONFIG_PPSI) += \
-	-I$(PTP_NOPOSIX)/PTPWRd \
-	-include $(PTP_NOPOSIX)/PTPWRd/dep/trace.h \
-
 obj-ppsi = \
 	$(PPSI)/ppsi.o \
 	$(PPSI)/proto-standard/libstd.a
diff --git a/shell/cmd_ptrack.c b/shell/cmd_ptrack.c
index 61e420f..7c48dbc 100644
--- a/shell/cmd_ptrack.c
+++ b/shell/cmd_ptrack.c
@@ -10,7 +10,12 @@
 #include <string.h>
 #include <wrc.h>
 #include "shell.h"
-#include "ptpd.h"
+#ifdef CONFIG_PPSI
+#  include <ppsi/ppsi.h>
+#  include "wr-api.h"
+#else
+#  include "ptpd.h"
+#endif
 
 extern int wrc_phase_tracking;
 
diff --git a/softpll/softpll_ng.c b/softpll/softpll_ng.c
index 812f242..77ee4de 100644
--- a/softpll/softpll_ng.c
+++ b/softpll/softpll_ng.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <wrc.h>
 #include "board.h"
 #include "trace.h"
 #include "hw/softpll_regs.h"
diff --git a/wrc_main.c b/wrc_main.c
index 320f9b0..9dde412 100644
--- a/wrc_main.c
+++ b/wrc_main.c
@@ -19,7 +19,6 @@
 #include "endpoint.h"
 #include "minic.h"
 #include "pps_gen.h"
-#include "ptpd.h"
 #include "ptpd_netif.h"
 #include "i2c.h"
 #include "eeprom.h"
-- 
GitLab