diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-04-26 16:56:40 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-04-26 18:48:42 +0000 |
commit | 19e83f6bdf86f92ee90db77d606affe5b08f8b40 (patch) | |
tree | ff3739d194f016733ca5c8531bc98405545aadc0 | |
parent | 143f6ffe9cd288d2b507ddc1508316181c1007a7 (diff) | |
download | qemu-19e83f6bdf86f92ee90db77d606affe5b08f8b40.zip qemu-19e83f6bdf86f92ee90db77d606affe5b08f8b40.tar.gz qemu-19e83f6bdf86f92ee90db77d606affe5b08f8b40.tar.bz2 |
configure: Make epoll_create1 test work around SPARC glibc bug
Work around a SPARC glibc bug which caused the epoll_create1 configure
test to wrongly claim that the function was present. Some versions of
SPARC glibc provided the function in the library but didn't declare
it in the include file; the result is that gcc warns about an implicit
declaration but a link succeeds. So we reference the function as a
value rather than a function call to induce a compile time error
if the declaration was not present.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rwxr-xr-x | configure | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -2225,7 +2225,15 @@ cat > $TMPC << EOF int main(void) { - epoll_create1(0); + /* Note that we use epoll_create1 as a value, not as + * a function being called. This is necessary so that on + * old SPARC glibc versions where the function was present in + * the library but not declared in the header file we will + * fail the configure check. (Otherwise we will get a compiler + * warning but not an error, and will proceed to fail the + * qemu compile where we compile with -Werror.) + */ + epoll_create1; return 0; } EOF |