Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420017 - media-libs/libsfml-1.6-r1 with gcc-4.7 - In member function ‘sf::priv::JoystickState sf::priv::Joystick::UpdateState()’: Linux/Joystick.cpp:103:62: error: ‘read’ was not declared in this scope
Summary: media-libs/libsfml-1.6-r1 with gcc-4.7 - In member function ‘sf::priv::Joysti...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tim Harder
URL:
Whiteboard: doesn't block gcc-4.7-stable
Keywords: PATCH
Depends on:
Blocks: gcc-4.7
  Show dependency tree
 
Reported: 2012-06-07 02:43 UTC by Sergey Zubkov
Modified: 2012-06-07 20:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
adds missing #include to compile with gcc 4.7 (libsfml-1.6-gcc47.patch,359 bytes, patch)
2012-06-07 02:43 UTC, Sergey Zubkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Zubkov 2012-06-07 02:43:20 UTC
Created attachment 314499 [details, diff]
adds missing #include to compile with gcc 4.7

media-libs/libsfml-1.6-r1 fails to build with gcc-4.7.0 with the following:

Linux/Joystick.cpp: In member function ‘sf::priv::JoystickState sf::priv::Joystick::UpdateState()’:
Linux/Joystick.cpp:103:62: error: ‘read’ was not declared in this scope
make[2]: *** [Linux/Joystick.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libsfml-1.6-r1/work/SFML-1.6/src/SFML/Window'

Suggested patch is to add #include <unistd.h> in that file, patch attached.
Comment 1 Tim Harder gentoo-dev 2012-06-07 20:18:49 UTC
Fixed in CVS.
Comment 2 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-06-07 20:45:55 UTC
+  07 Jun 2012; Tim Harder <radhermit@gentoo.org> libsfml-1.6-r1.ebuild,
+  +files/libsfml-1.6-gcc47.patch:
+  Fix build with gcc-4.7 (bug #420017 by Sergey Zubkov).