Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test-suite] CLAMR musl compilation error #94320

Open
v01dXYZ opened this issue Jun 4, 2024 · 0 comments
Open

[test-suite] CLAMR musl compilation error #94320

v01dXYZ opened this issue Jun 4, 2024 · 0 comments

Comments

@v01dXYZ
Copy link
Contributor

v01dXYZ commented Jun 4, 2024

We should use #include <sys/time.h> instead of #include <time.h> when using gettimeofday/struct timeval. musl time.h doesn't include sys/time.h as glibc does.

Adding this include to timer.h fixes the problem.

v01dXYZ pushed a commit to v01dXYZ/llvm-test-suite that referenced this issue Jun 4, 2024
With musl, mesh.cpp compilation fails as struct timeval is not defined
although <time.h> is included before "timer.h" which uses this data
type.

The reason is with musl contrary to glibc, <time.h> does not include
<sys/time.h> (which provides gettimeofday, struct timeval).

Fixes llvm/llvm-project#94320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants