https://bugs.llvm.org/show_bug.cgi?id=38495

            Bug ID: 38495
           Summary: After r338419, <ctime> no longer compiles on FreeBSD,
                    due to lack of timespec_get()
           Product: libc++
           Version: 7.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: dimi...@andric.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

See also: https://bugs.freebsd.org/230400

While testing 7.0.0 rc1, we got 2028 new libc++ test failures, most of which
are due to errors similar to:

In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp:26:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/iostream:38:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/ios:216:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/__locale:18:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/mutex:191:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/__mutex_base:15:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/chrono:795:
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/ctime:77:9: error: no
member named 'timespec_get' in the global namespace; did you mean 'timespec'?
using ::timespec_get;
     ~~^~~~~~~~~~~~
       timespec
/usr/include/sys/_timespec.h:44:8: note: 'timespec' declared here
struct timespec {
      ^

This is due to FreeBSD not having timespec_get(), even though it is apparently
required by C11, and the conditional in <ctime> being:

#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES)
using ::timespec_get;
#endif

Work is ongoing to add timespec_get() to FreeBSD, but for 7.0.0 a workaround
would be nice.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to