Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Erik Rull
Richard Henderson wrote: On 11/26/2013 07:01 AM, Michael S. Tsirkin wrote: Can you confirm this works? I can confirm that with this follow-on I can once again build on RHEL 5.3. r~ Sorry, a bit late, but yes, it compiles on my Debian 4.0. My test target is down at the moment, I try to ge

Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Richard Henderson
On 11/26/2013 07:01 AM, Michael S. Tsirkin wrote: > Can you confirm this works? I can confirm that with this follow-on I can once again build on RHEL 5.3. r~

Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Michael S. Tsirkin
On Mon, Nov 25, 2013 at 09:14:19PM +0100, Erik Rull wrote: > Michael S. Tsirkin wrote: > >g_array_get_element_size was only added in glib 2.14, > >there's no way to find element size in with an older glib. > > > >Fortunately we only use a single table (linker) where element size > 1. > >Switch elem

Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Michael S. Tsirkin
On Mon, Nov 25, 2013 at 09:14:19PM +0100, Erik Rull wrote: > Michael S. Tsirkin wrote: > >g_array_get_element_size was only added in glib 2.14, > >there's no way to find element size in with an older glib. > > > >Fortunately we only use a single table (linker) where element size > 1. > >Switch elem

Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Richard Henderson
On 11/25/2013 09:48 PM, Michael S. Tsirkin wrote: > +#if GLIB_CHECK_VERSION(2, 14, 0) > +assert(g_array_get_element_size(table) == 1); > +#endif https://developer.gnome.org/glib/2.28/glib-Arrays.html#g-array-get-element-size says "Since 2.22", not 2.14. r~

Re: [Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Erik Rull
Michael S. Tsirkin wrote: g_array_get_element_size was only added in glib 2.14, there's no way to find element size in with an older glib. Fortunately we only use a single table (linker) where element size > 1. Switch element size to 1 everywhere, then we can just look at len field to get table

[Qemu-devel] [PULL for-1.7 v2 4/6] acpi-build: fix build on glib < 2.14

2013-11-25 Thread Michael S. Tsirkin
g_array_get_element_size was only added in glib 2.14, there's no way to find element size in with an older glib. Fortunately we only use a single table (linker) where element size > 1. Switch element size to 1 everywhere, then we can just look at len field to get table size in bytes. Add an asser