diff options
author | Reini Urban <rurban@cpanel.net> | 2016-04-18 09:38:13 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2016-04-23 11:43:40 -0400 |
commit | de1003b4553058df412757f35324ef710bc68a2e (patch) | |
tree | 6eebcd7f27a1d634cf32676e35f306ae48cf6f1b /dist | |
parent | 7e69463d5ba4e34c2ea10a5c117a1777435209ec (diff) | |
download | perl-de1003b4553058df412757f35324ef710bc68a2e.tar.gz |
[PATCH] Time-Hires: Fix declaration-after-statement error with darwin 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.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Time-HiRes/HiRes.xs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/Time-HiRes/HiRes.xs b/dist/Time-HiRes/HiRes.xs index 8b8f25c594..38ca0dc320 100644 --- a/dist/Time-HiRes/HiRes.xs +++ b/dist/Time-HiRes/HiRes.xs @@ -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(); |