Bug 103674 - u_queue.c:173:7: error: implicit declaration of function 'timespec_get' is invalid in C99
Summary: u_queue.c:173:7: error: implicit declaration of function 'timespec_get' is in...
Status: RESOLVED MOVED
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 18:35 UTC by Vinson Lee
Modified: 2019-09-18 20:26 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (1.08 KB, patch)
2017-11-12 00:52 UTC, Mauro Rossi
Details | Splinter Review

Description Vinson Lee 2017-11-10 18:35:00 UTC
mesa: d1edf6e3962e187a1213dd4064ba3b6fb6c3ea4f (master 17.4.0-devel)

u_queue.c:173:7: error: implicit declaration of function 'timespec_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      timespec_get(&ts, TIME_UTC);
      ^
Comment 1 Mauro Rossi 2017-11-12 00:52:36 UTC
Created attachment 135413 [details] [review]
proposed patch

Hi,

when building Android, I see a similar error.

external/mesa/src/util/u_queue.c:173: error: undefined reference to 'timespec_get'

clock_gettime(CLOCK_REALTIME, &ts) is equivalent to timespec_get(&ts, TIME_UTC)
but has the advantage that avoids the building error.

Proposed patch is in the attachement.
Mauro Rossi
Comment 3 Nicolai Hähnle 2017-11-16 05:48:49 UTC
commit 2e3d0dd6c8f405f27d68b1ac35e928233bf8b89c
Comment 4 Yurii Kolesnykov 2019-08-22 15:18:59 UTC
Back again with Xcode 11/macOS Catalina. 

../src/util/u_queue.c:176:7: error: implicit declaration of function 'timespec_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

clang --version
Apple clang version 11.0.0 (clang-1100.0.32.5)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Comment 5 Lionel Landwerlin 2019-08-23 09:13:35 UTC
Sorry, I broke this again.
Here is a fix https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1753

Let me know if it helps, thanks.
Comment 6 GitLab Migration User 2019-09-18 20:26:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1020.


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.