Discussion:
[Linuxptp-devel] [PATCH 1/2] raw: Do not include net/ethernet.h
Florian Fainelli
2017-05-07 21:44:13 UTC
Permalink
musl-libc does not provide a net/ethernet.h which is a glibc-ism.
eth_hdr is already declared in ether.h and provides everything that is
necessary.

Signed-off-by: Wojciech Dubowik <***@neratec.com>
[florian: extract patch for OpenWrt, add commit message]
Signed-off-by: Florian Fainelli <***@gmail.com>
---
raw.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/raw.c b/raw.c
index f51c829657af..73e45b45bd25 100644
--- a/raw.c
+++ b/raw.c
@@ -20,7 +20,6 @@
#include <fcntl.h>
#include <linux/filter.h>
#include <linux/if_ether.h>
-#include <net/ethernet.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netpacket/packet.h>
--
2.11.0
Florian Fainelli
2017-05-07 21:44:14 UTC
Permalink
Fixes the following build errors seen with musl-libc:

In file included from print.h:25:0,
from linreg.c:24:
util.h:364:32: error: unknown type name 'time_t'
int rate_limited(int interval, time_t *last);

Signed-off-by: Stephen Walker <stephendwalker+***@gmail.com>
[florian: extract patch from OpenWrt, add commit message]
Signed-off-by: Florian Fainelli <***@gmail.com>
---
util.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/util.h b/util.h
index e912f195b664..0c1a357faee6 100644
--- a/util.h
+++ b/util.h
@@ -20,6 +20,8 @@
#ifndef HAVE_UTIL_H
#define HAVE_UTIL_H

+#include <time.h>
+
#include "ddt.h"
#include "ether.h"
--
2.11.0
Richard Cochran
2017-05-08 04:39:03 UTC
Permalink
Post by Florian Fainelli
In file included from print.h:25:0,
util.h:364:32: error: unknown type name 'time_t'
int rate_limited(int interval, time_t *last);
[florian: extract patch from OpenWrt, add commit message]
again:
The ``from`` line must be the very first line in the message body,
and has the form:

From: Original Author <***@example.com>


@Stephen, do you agree to have your work merged into linuxptp?


Thanks,
Richard
Richard Cochran
2017-05-15 21:21:15 UTC
Permalink
Post by Florian Fainelli
In file included from print.h:25:0,
util.h:364:32: error: unknown type name 'time_t'
int rate_limited(int interval, time_t *last);
[florian: extract patch from OpenWrt, add commit message]
Applied.

Thanks,
Richard

Richard Cochran
2017-05-08 04:36:41 UTC
Permalink
Post by Florian Fainelli
musl-libc does not provide a net/ethernet.h which is a glibc-ism.
eth_hdr is already declared in ether.h and provides everything that is
necessary.
[florian: extract patch for OpenWrt, add commit message]
In order to submit a patch from someone else, please follow this
direction from linux/Documentation/process/submitting-patches.rst:

The ``from`` line must be the very first line in the message body,
and has the form:

From: Original Author <***@example.com>

That way, git will have the correct author.

@Wojciech, do you agree to have your work merged into linuxptp?

Thanks,
Richard
Loading...