Skip to content

Commit

Permalink
[PATCH] Time-Hires: Fix declaration-after-statement error with darwin…
Browse files Browse the repository at this point in the history
… threads

rt #113856: the flag -Werror=declaration-after-statement is seemingly
not working for clang (in OS X, not yet tested elsewhere), but working
as intended for gcc.  Since the system cc for OS X is clang (via Apple),
this failure to fail has been masked.

To restate: without this patch the Time-HiRes does not build in OS X
with gcc under usethreads.
  • Loading branch information
Reini Urban authored and jhi committed Apr 23, 2016
1 parent 7e69463 commit de1003b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/Time-HiRes/HiRes.xs
Expand Up @@ -767,11 +767,11 @@ static mach_timebase_info_data_t timebase_info;
static struct timespec timespec_init;

static int darwin_time_init() {
struct timeval tv;
int success = 1;
#ifdef USE_ITHREADS
MUTEX_LOCK(&darwin_time_mutex);
#endif
struct timeval tv;
int success = 1;
if (absolute_time_init == 0) {
/* mach_absolute_time() cannot fail */
absolute_time_init = mach_absolute_time();
Expand Down

0 comments on commit de1003b

Please sign in to comment.