aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch
blob: 25d08ab9511f77ff90a514b77b317fc6688bd20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 68fafc4ea10365ac2e74ab7c660d097696857677 Mon Sep 17 00:00:00 2001
From: root <git@andred.net>
Date: Wed, 20 Jul 2016 23:40:32 +0100
Subject: [PATCH 2/5] libbridge: fix some build-time warnings (fcntl.h)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There are build-time warnings at the moment when building
against musl, as the code here #include's the wrong file,
sys/fcntl.h instead of fcntl.h

In file included from libbridge_devif.c:26:0:
<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
  ^~~~~~~
In file included from libbridge_if.c:23:0:
<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
  ^~~~~~~

glibc headers silently redirect sys/fcntl.h to fcntl.h so the
issue is not seen there.

Let's fix the #include's to so as to use the correct ones
and silence the compiler.

Upstream-Status: Pending

Signed-off-by: André Draszik <git@andred.net>
---
 libbridge/libbridge_devif.c | 2 +-
 libbridge/libbridge_if.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index 1e83925..2cf78f6 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -23,7 +23,7 @@
 #include <errno.h>
 #include <string.h>
 #include <dirent.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 
 #include "libbridge.h"
 #include "libbridge_private.h"
diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c
index 77d3f8a..9cf4bac 100644
--- a/libbridge/libbridge_if.c
+++ b/libbridge/libbridge_if.c
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/ioctl.h>
 
 #include "libbridge.h"
-- 
2.8.1