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

Bug 584352

Summary: =x11-libs/libva-vdpau-driver-0.7.4-r3: missing #include <sys/time.h> in src/util.c
Product: Gentoo Linux Reporter: Anthony Basile <blueness>
Component: Current packagesAssignee: Alexis Ballier <aballier>
Status: CONFIRMED ---    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Anthony Basile gentoo-dev 2016-05-27 18:27:47 UTC
This is an upstream bug which I'm reporting here for completeness.

src/util.c defines `struct timeval t;` around line 76, but does not include <sys/time.h> as required by POSIX [1].  This is okay with glibc (because of how the headers stack), but not with other libcs, like musl.  It leads to a compile time error.  This is easily fixed with

--- src/util.c.orig	2016-05-27 18:23:49.830943995 +0000
+++ src/utils.c	2016-05-27 18:23:39.534238312 +0000
@@ -21,6 +21,7 @@
 #include "sysdeps.h"
 #include "utils.h"
 #include <time.h>
+#include <sys/time.h>
 #include <errno.h>
 #define DEBUG 1


Comment 1 Anthony Basile gentoo-dev 2016-05-29 16:25:16 UTC
Patch sent upstream at
Comment 2 Alexis Ballier gentoo-dev 2016-12-29 15:11:27 UTC
from what i see on the upstream bug, feel free to apply it to portage tree