[libvirt] Entering freeze for libvirt-0.10.0

Thomas Graf tgraf at suug.ch
Fri Aug 24 15:49:32 UTC 2012


On Fri, Aug 24, 2012 at 11:30:44AM -0400, Laine Stump wrote:
> On 08/24/2012 10:28 AM, Viktor Mihajlovski wrote:
> >
> > fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit
> >
> > CC     libvirt_util_la-virnetdev.lo
> > cc1: warnings being treated as errors
> > /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined
> 
> libvirt itself never uses that function. Also, in the version of
> /usr/include/netlink/object.h I'm working with (on Fedora 17) that
> function isn't declared as inline.
> 
> Thomas, do you have any info on the libnl version used in Ubuntu 10.04,
> and/or what might be the cause of this warning.

It's a static inline which I guess is the problem here. Laine, you
are probably using a libnl version which does not include the commit
below.

Why is the compiler not OK with this?

commit a8cd7b62c86127e2c946373d50efac9d2ed8da38
Author: Pavel Roskin <proski at gnu.org>
Date:   Tue Apr 7 17:04:04 2009 -0400

    nl_object_priv() is inline, so define it in the header

diff --git a/include/netlink/object.h b/include/netlink/object.h
index bae2bf4..ef1ed9f 100644
--- a/include/netlink/object.h
+++ b/include/netlink/object.h
@@ -56,7 +56,11 @@ extern int                   nl_object_is_marked(struct nl_object *);
 /* Access Functions */
 extern int                     nl_object_get_refcnt(struct nl_object *);
 extern struct nl_cache *       nl_object_get_cache(struct nl_object *);
-extern inline void *           nl_object_priv(struct nl_object *);
+static inline void *           nl_object_priv(struct nl_object *obj)
+{
+       return obj;
+}
+
 
 #ifdef __cplusplus
 }





More information about the libvir-list mailing list