Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | From 68fafc4ea10365ac2e74ab7c660d097696857677 Mon Sep 17 00:00:00 2001 |
| 2 | From: root <git@andred.net> |
| 3 | Date: Wed, 20 Jul 2016 23:40:32 +0100 |
| 4 | Subject: [PATCH 2/5] libbridge: fix some build-time warnings (fcntl.h) |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | There are build-time warnings at the moment when building |
| 10 | against musl, as the code here #include's the wrong file, |
| 11 | sys/fcntl.h instead of fcntl.h |
| 12 | |
| 13 | In 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 | ^~~~~~~ |
| 17 | In 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 | |
| 22 | glibc headers silently redirect sys/fcntl.h to fcntl.h so the |
| 23 | issue is not seen there. |
| 24 | |
| 25 | Let's fix the #include's to so as to use the correct ones |
| 26 | and silence the compiler. |
| 27 | |
| 28 | Upstream-Status: Pending |
| 29 | |
| 30 | Signed-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 | |
| 36 | diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c |
| 37 | index 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" |
| 49 | diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c |
| 50 | index 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 | -- |
| 63 | 2.8.1 |
| 64 | |