This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 794f0c2ce93 include/cxx/ctime: Add localtime to std namespace.
794f0c2ce93 is described below
commit 794f0c2ce93355bdf29341b89436218c6d94e77a
Author: nicolasWDC <[email protected]>
AuthorDate: Mon Jun 8 20:07:31 2026 +0000
include/cxx/ctime: Add localtime to std namespace.
NuttX time.h declares localtime in the global namespace, but the C++
ctime shim does not import it into namespace std.
As a result, valid C++ code using std::localtime fails to compile with
the NuttX C++ headers, even though ::localtime is available.
Add using ::localtime to include/cxx/ctime.
Signed-off-by: nicolasWDC <[email protected]>
---
include/cxx/ctime | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/cxx/ctime b/include/cxx/ctime
index 45b9aadcf64..fa9d2fc211e 100644
--- a/include/cxx/ctime
+++ b/include/cxx/ctime
@@ -46,6 +46,7 @@ namespace std
using ::clock_settime;
using ::clock_gettime;
using ::mktime;
+ using ::localtime;
using ::gmtime_r;
using ::gmtime;
using ::strftime;