Skip to content

Commit

Permalink
CLAMR: Add missing include wrt struct timeval for musl
Browse files Browse the repository at this point in the history
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
  • Loading branch information
v01dxyz committed Jun 4, 2024
1 parent 610b959 commit b6d9197
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#ifndef _TIMER_H
#define _TIMER_H

#include <sys/time.h>

#ifdef __cplusplus
extern "C"
{
Expand Down

0 comments on commit b6d9197

Please sign in to comment.