diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-12-09 19:17:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-12-09 19:17:56 +0000 |
commit | bc053cafcaa284323172c45995fff6d26b9189ab (patch) | |
tree | 0a5105d33a195aa2faa7647f104248b6d4775ddd /include/time.h | |
parent | d8010b1175094374c8295d0fba56c2402b32a4da (diff) | |
download | src-bc053cafcaa284323172c45995fff6d26b9189ab.tar.gz src-bc053cafcaa284323172c45995fff6d26b9189ab.zip |
Correctly check for C++17 and higher when declaring timespec_get()
Summary:
In rS338751, the check to declare `timespec_get()` for C++17 and higher
was incorrectly done against a `cplusplus` define, while it should have
been `__cplusplus`.
Fix this by using `__cplusplus`, and also bump `__FreeBSD_version` so it
becomes possible to correctly check for `timespec_get()` in upstream
libc++ headers.
Reviewed by: brooks, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D22735
Notes
Notes:
svn path=/head/; revision=355568
Diffstat (limited to 'include/time.h')
-rw-r--r-- | include/time.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/time.h b/include/time.h index cec901a1e8ba..2dba82b87baa 100644 --- a/include/time.h +++ b/include/time.h @@ -208,7 +208,7 @@ time_t posix2time(time_t t); #endif #if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ - (defined(cplusplus) && cplusplus >= 201703) + (defined(__cplusplus) && __cplusplus >= 201703) #include <sys/_timespec.h> /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ |