All of lore.kernel.org
 help / color / mirror / Atom feed
From: "S. Lockwood-Childs" <sjl@vctlabs.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][PATCH] libimobiledevice: fix gcc 5 link failure
Date: Sat, 3 Oct 2015 18:13:11 -0700	[thread overview]
Message-ID: <20151004011311.GG3552@dent.vctlabs.com> (raw)

Drop 'inline' from some functions that had 'inline' keyword without
a definition at that point (they were defined in a different file).

Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
---
 .../files/inline-without-definition.patch          | 31 ++++++++++++++++++++++
 .../libimobiledevice/libimobiledevice_1.1.4.bb     |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch

diff --git a/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch b/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch
new file mode 100644
index 0000000..eec60e8
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libimobiledevice/files/inline-without-definition.patch
@@ -0,0 +1,31 @@
+Fix link error with gcc 5 toolchains
+
+ afc.c:258: error: undefined reference to 'debug_buffer'
+ collect2: error: ld returned 1 exit status
+
+debug.h header was declaring things inline without providing a definition.
+Files that included this header then failed to link against the corresponding
+external symbol in debug.c, because the linker took the 'inline' keyword
+seriously rather than ignoring it.
+
+--- libimobiledevice-1.1.4/src/debug.h.orig	2015-10-03 16:24:08.758740386 -0700
++++ libimobiledevice-1.1.4/src/debug.h	2015-10-03 16:24:22.706740355 -0700
+@@ -44,14 +44,14 @@
+ #define debug_plist(a)
+ #endif
+ 
+-LIBIMOBILEDEVICE_INTERNAL inline void debug_info_real(const char *func,
++LIBIMOBILEDEVICE_INTERNAL void debug_info_real(const char *func,
+ 											const char *file,
+ 											int	line,
+ 											const char *format, ...);
+ 
+-LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(const char *data, const int length);
+-LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer_to_file(const char *file, const char *data, const int length);
+-LIBIMOBILEDEVICE_INTERNAL inline void debug_plist_real(const char *func,
++LIBIMOBILEDEVICE_INTERNAL void debug_buffer(const char *data, const int length);
++LIBIMOBILEDEVICE_INTERNAL void debug_buffer_to_file(const char *file, const char *data, const int length);
++LIBIMOBILEDEVICE_INTERNAL void debug_plist_real(const char *func,
+ 											const char *file,
+ 											int	line,
+ 											plist_t plist);
diff --git a/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb b/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb
index 06260f7..32aca96 100644
--- a/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb
+++ b/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb
@@ -12,6 +12,7 @@ DEPENDS = "libplist usbmuxd libtasn1 gnutls libgcrypt"
 SRC_URI = " \
     http://www.libimobiledevice.org/downloads/libimobiledevice-${PV}.tar.bz2 \
     file://configure-fix-largefile.patch \
+    file://inline-without-definition.patch \
 "
 
 SRC_URI[md5sum] = "3f28cbc6a2e30d34685049c0abde5183"
-- 
1.9.1



                 reply	other threads:[~2015-10-04  0:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20151004011311.GG3552@dent.vctlabs.com \
    --to=sjl@vctlabs.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.