Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 420017

Summary: 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
Product: Gentoo Linux Reporter: Sergey Zubkov <cubbi>
Component: Current packagesAssignee: Tim Harder <radhermit>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: doesn't block gcc-4.7-stable
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: adds missing #include to compile with gcc 4.7

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).