Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Fails to build with Kea 2.0.0 (and Boost 1.77) #5

Open
jirutka opened this issue Oct 26, 2021 · 1 comment
Open

Fails to build with Kea 2.0.0 (and Boost 1.77) #5

jirutka opened this issue Oct 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jirutka
Copy link
Member

jirutka commented Oct 26, 2021

In file included from user_registry.cc:10:
./user_registry.h:174:10: error: 'time_t' in namespace 'std' does not name a type; did you mean 'time_put'?
  174 |     std::time_t getInvalidAfter() const;
      |          ^~~~~~
      |          time_put
./user_registry.h:191:10: error: 'time_t' in namespace 'std' does not name a type; did you mean 'time_put'?
  191 |     std::time_t invalid_after_;
      |          ^~~~~~
      |          time_put
user_registry.cc: In constructor 'user_chk::Result::Result(user_chk::UserPtr, user_chk::ResultType, time_t)':
user_registry.cc:163:108: error: class 'user_chk::Result' does not have any field named 'invalid_after_'
  163 | Result::Result(const UserPtr user, ResultType result, time_t invalid_after): user_(user), result_(result), invalid_after_(invalid_after) { }
      |                                                                                                            ^~~~~~~~~~~~~~
user_registry.cc: At global scope:
user_registry.cc:179:1: error: no declaration matches 'time_t user_chk::Result::getInvalidAfter() const'
  179 | Result::getInvalidAfter() const {
      | ^~~~~~
user_registry.cc:179:1: note: no functions named 'time_t user_chk::Result::getInvalidAfter() const'
In file included from user_registry.cc:10:
./user_registry.h:149:7: note: 'class user_chk::Result' defined here
  149 | class Result {
      |       ^~~~~~
user_registry.cc: In member function 'bool user_chk::Result::isExpired() const':
user_registry.cc:185:11: error: 'invalid_after_' was not declared in this scope
  185 |   return (invalid_after_ <= std::time(nullptr));
      |           ^~~~~~~~~~~~~~
@jirutka jirutka added the bug Something isn't working label Oct 26, 2021
@jirutka
Copy link
Member Author

jirutka commented Oct 26, 2021

It’s just a missing include. We need to add #include <ctime> to user_registry.h.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant