]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: avoid non-portable byte-swapping
authorEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 19:53:15 +0000 (13:53 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 19:53:15 +0000 (13:53 -0600)
commit4bba6579cccb8e1423bc1a553fc1109845757b00
tree11bbf885c32e178efafc2ddc69abb1b129e5d18d
parente6bd3ce056f5362a229aad93278abc11814bb476
build: avoid non-portable byte-swapping

Commit 0fc89098 used functions only available on glibc, completely
botched 32-bit environments, and risked SIGBUS due to unaligned
memory access on platforms that aren't as forgiving as x86_64.

* bootstrap.conf (gnulib_modules): Import ffsl.
* src/util/bitmap.c (includes): Use <strings.h> for ffsl.
(virBitmapNewData, virBitmapToData): Avoid 64-bit assumptions and
non-portable functions.
bootstrap.conf
src/util/bitmap.c