blob: 25d08ab9511f77ff90a514b77b317fc6688bd20b [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001From 68fafc4ea10365ac2e74ab7c660d097696857677 Mon Sep 17 00:00:00 2001
2From: root <git@andred.net>
3Date: Wed, 20 Jul 2016 23:40:32 +0100
4Subject: [PATCH 2/5] libbridge: fix some build-time warnings (fcntl.h)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9There are build-time warnings at the moment when building
10against musl, as the code here #include's the wrong file,
11sys/fcntl.h instead of fcntl.h
12
13In file included from libbridge_devif.c:26:0:
14<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
15 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
16 ^~~~~~~
17In file included from libbridge_if.c:23:0:
18<sysroot>/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
19 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
20 ^~~~~~~
21
22glibc headers silently redirect sys/fcntl.h to fcntl.h so the
23issue is not seen there.
24
25Let's fix the #include's to so as to use the correct ones
26and silence the compiler.
27
28Upstream-Status: Pending
29
30Signed-off-by: André Draszik <git@andred.net>
31---
32 libbridge/libbridge_devif.c | 2 +-
33 libbridge/libbridge_if.c | 2 +-
34 2 files changed, 2 insertions(+), 2 deletions(-)
35
36diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
37index 1e83925..2cf78f6 100644
38--- a/libbridge/libbridge_devif.c
39+++ b/libbridge/libbridge_devif.c
40@@ -23,7 +23,7 @@
41 #include <errno.h>
42 #include <string.h>
43 #include <dirent.h>
44-#include <sys/fcntl.h>
45+#include <fcntl.h>
46
47 #include "libbridge.h"
48 #include "libbridge_private.h"
49diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c
50index 77d3f8a..9cf4bac 100644
51--- a/libbridge/libbridge_if.c
52+++ b/libbridge/libbridge_if.c
53@@ -20,7 +20,7 @@
54 #include <stdlib.h>
55 #include <errno.h>
56 #include <string.h>
57-#include <sys/fcntl.h>
58+#include <fcntl.h>
59 #include <sys/ioctl.h>
60
61 #include "libbridge.h"
62--
632.8.1
64