From: Rodrigo Rebello <rprebello@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] vnstat: add upstream patch to fix build with musl
Date: Tue, 1 Dec 2015 15:24:58 -0200 [thread overview]
Message-ID: <1448990698-31684-2-git-send-email-rprebello@gmail.com> (raw)
In-Reply-To: <1448990698-31684-1-git-send-email-rprebello@gmail.com>
The header file 'fcntl.h' was missing from 'src/common.h', which caused
the build with musl to fail with undeclared symbol errors like the
following:
dbaccess.c: In function ?backupdb?:
dbaccess.c:268:25: error: ?O_RDONLY? undeclared (first use in this function)
if ((c = open(current, O_RDONLY)) == -1) {
^
This has already been fixed upstream, so the included patch must be
dropped on the next version bump.
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
...-fcntl.h-include-needed-by-open-closes-21.patch | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 package/vnstat/0001-add-missing-fcntl.h-include-needed-by-open-closes-21.patch
diff --git a/package/vnstat/0001-add-missing-fcntl.h-include-needed-by-open-closes-21.patch b/package/vnstat/0001-add-missing-fcntl.h-include-needed-by-open-closes-21.patch
new file mode 100644
index 0000000..5489580
--- /dev/null
+++ b/package/vnstat/0001-add-missing-fcntl.h-include-needed-by-open-closes-21.patch
@@ -0,0 +1,28 @@
+From a222434e096ce42c7937839f9666691f2b8a612f Mon Sep 17 00:00:00 2001
+From: Teemu Toivola <git@humdi.net>
+Date: Sat, 27 Jun 2015 18:29:22 +0300
+Subject: [PATCH] add missing fcntl.h include needed by open(), closes #21
+
+[Backport from upstream commit 964d7cd62b8626d51bf7ce06564aa9bd1d2b4d4c.
+Fixes undeclared symbol issues when building with musl.]
+
+Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
+---
+ src/common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/common.h b/src/common.h
+index 7616e55..eb0b61f 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -22,6 +22,7 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <libgen.h>
++#include <fcntl.h>
+
+ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
+ #include <sys/param.h>
+--
+2.1.4
+
--
2.1.4
next prev parent reply other threads:[~2015-12-01 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 17:24 [Buildroot] [PATCH 1/2] vnstat: bump to version 1.14 Rodrigo Rebello
2015-12-01 17:24 ` Rodrigo Rebello [this message]
2015-12-01 21:35 ` Thomas Petazzoni
2015-12-01 21:39 ` Rodrigo Rebello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448990698-31684-2-git-send-email-rprebello@gmail.com \
--to=rprebello@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.