Bug 103671 - os_time.c:104:4: error: implicit declaration of function 'usleep' is invalid in C99
Summary: os_time.c:104:4: error: implicit declaration of function 'usleep' is invalid ...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-11-10 16:44 UTC by Vinson Lee
Modified: 2017-11-10 18:33 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2017-11-10 16:44:58 UTC
mesa: e456d4def5cb0cff3c243c267dd08ac17042e9e4 (master 17.4.0-devel)

os_time.c:104:4: error: implicit declaration of function 'usleep' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   usleep(usecs);
   ^
Comment 1 Jon Turney 2017-11-10 18:26:28 UTC
I guess this is fixed by 764f1e4d4509448797008c2b20956b31d8360ef0
Comment 2 Vinson Lee 2017-11-10 18:33:01 UTC
commit 764f1e4d4509448797008c2b20956b31d8360ef0
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Nov 10 11:41:13 2017 +0000

    util: include unistd.h, which may be required for usleep prototype
    
    This seems to be dropped in 222a2fb9 "util: move os_time.[ch] to src/util"
    
    ../../../src/util/os_time.c: In function ‘os_time_sleep’:
    ../../../src/util/os_time.c:104:4: error: implicit declaration of function ‘usleep’ [-Werror=implicit-function-declaration]
    
    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.