From a6ae4bf67d12955cf266e4a896a45dfd21a8229d Mon Sep 17 00:00:00 2001
From: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: Thu, 28 Jan 2021 13:11:39 +0100
Subject: [PATCH] libethernet: fix ethmngr build error

---
 ethernet.c       | 3 +++
 ethernet.h       | 2 --
 test_stub/stub.c | 3 +++
 test_stub/stub.h | 1 -
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ethernet.c b/ethernet.c
index abec12f..9fb105b 100644
--- a/ethernet.c
+++ b/ethernet.c
@@ -33,6 +33,9 @@
 #include <linux/sockios.h>
 #include <linux/mii.h>
 
+#include <net/if.h>
+#include "easy.h"
+
 #include "ethernet.h"
 
 #ifdef IOPSYS_BROADCOM
diff --git a/ethernet.h b/ethernet.h
index 97618bc..0116428 100644
--- a/ethernet.h
+++ b/ethernet.h
@@ -25,8 +25,6 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <linux/types.h>
-#include <net/if.h>
-#include "easy.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/test_stub/stub.c b/test_stub/stub.c
index 9cb4948..e244500 100644
--- a/test_stub/stub.c
+++ b/test_stub/stub.c
@@ -33,6 +33,9 @@
 #include <unistd.h>
 #include <stdlib.h>
 
+#include "easy.h"
+#include "ethernet.h"
+
 #include "stub.h"
 
 int test_eth_set_link_settings(const char *name, struct eth_link link)
diff --git a/test_stub/stub.h b/test_stub/stub.h
index b8e557f..f104620 100644
--- a/test_stub/stub.h
+++ b/test_stub/stub.h
@@ -23,7 +23,6 @@
 #ifndef TEST_ETHERNET_H
 #define TEST_ETHERNET_H
 
-#include "ethernet.h"
 
 #define TESTSTATS(attr)    test ## _ ## attr
 
-- 
GitLab