[PATCH] sna: fix missing includes for fstat

Stefan Dirsch sndirsch at suse.de
Tue Apr 26 12:42:34 UTC 2016


From: Dominique Leuenberger <dimstar at opensuse.org>

In order for fstat to be usable, sys/stat.h needs to be included or we
might end up in a build failure like:

sna_driver.c: In function 'sna_handle_uevents':
sna_driver.c:799:6: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
---
 src/sna/sna_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index b245594..2852299 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -67,6 +67,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <sys/ioctl.h>
 #include <sys/fcntl.h>
 #include <sys/poll.h>
+#include <sys/stat.h>
 #include "i915_drm.h"
 
 #ifdef HAVE_VALGRIND
-- 
2.6.2



More information about the xorg-devel mailing list