From c1c2848b572ea7f92b7fa81dd5b1b9ef7c69b83b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 28 Jun 2018 13:12:16 +0200 Subject: Use _STRUCT_TIMESPEC as guard in [BZ #23349] After commit d76d3703551a362b472c866b5b6089f66f8daa8e ("Fix missing timespec definition for sys/stat.h (BZ #21371)") in combination with kernel UAPI changes, GCC sanitizer builds start to fail due to a conflicting definition of struct timespec in . Use _STRUCT_TIMESPEC as the header file inclusion guard, which is already checked in the kernel header, to support including and in the same translation unit. --- time/bits/types/struct_timespec.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'time') diff --git a/time/bits/types/struct_timespec.h b/time/bits/types/struct_timespec.h index 644db9fdb6..5b77c52b4f 100644 --- a/time/bits/types/struct_timespec.h +++ b/time/bits/types/struct_timespec.h @@ -1,5 +1,6 @@ -#ifndef __timespec_defined -#define __timespec_defined 1 +/* NB: Include guard matches what uses. */ +#ifndef _STRUCT_TIMESPEC +#define _STRUCT_TIMESPEC 1 #include -- cgit 1.4.1