Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libs/filesystem/src/operations.cpp:3867:7: error: '::utimbuf' has not been declared #250

Closed
jschueller opened this issue Aug 12, 2022 · 2 comments

Comments

@jschueller
Copy link

jschueller commented Aug 12, 2022

since 1.80 the build fails on centos:

2022-08-11T11:14:44.3215140Z gcc.compile.c++ bin.v2/libs/filesystem/build/gcc-10/release/threading-multi/visibility-hidden/directory.o
2022-08-11T11:14:44.4034841Z gcc.compile.c++ bin.v2/libs/filesystem/build/gcc-10/release/threading-multi/visibility-hidden/operations.o
2022-08-11T11:14:44.4038901Z libs/filesystem/src/operations.cpp: In function 'void boost::filesystem::detail::last_write_time(const boost::filesystem::path&, time_t, boost::system::error_code*)':
2022-08-11T11:14:44.4040025Z libs/filesystem/src/operations.cpp:3867:7: error: '::utimbuf' has not been declared
2022-08-11T11:14:44.4040489Z  3867 |     ::utimbuf buf;
2022-08-11T11:14:44.4040772Z       |       ^~~~~~~
2022-08-11T11:14:44.4041361Z libs/filesystem/src/operations.cpp:3868:5: error: 'buf' was not declared in this scope
2022-08-11T11:14:44.4042088Z  3868 |     buf.actime = st.st_atime; // utime() updates access time too :-(
2022-08-11T11:14:44.4042480Z       |     ^~~
2022-08-11T11:14:44.4042782Z In file included from ./boost/config.hpp:39,
2022-08-11T11:14:44.4043171Z                  from ./boost/filesystem/config.hpp:19,
2022-08-11T11:14:44.4043578Z                  from libs/filesystem/src/platform_config.hpp:81,
2022-08-11T11:14:44.4044250Z                  from libs/filesystem/src/operations.cpp:14:
2022-08-11T11:14:44.4044976Z libs/filesystem/src/operations.cpp:3870:26: error: '::utime' has not been declared; did you mean 'stime'?
2022-08-11T11:14:44.4045505Z  3870 |     if (BOOST_UNLIKELY(::utime(p.c_str(), &buf) < 0))

it seems some posix *at functions detection was introduced but the fallback does not compile on that platform (too old?):

- has POSIX *at APIs       : no [2]

https://github.com/boostorg/filesystem/blob/develop/src/operations.cpp#L3843

@Lastique
Copy link
Member

Thank you for the report, please test if 5864f39 fixes the problem.

@jschueller
Copy link
Author

its ok; thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants