summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/eventq.hh1
-rw-r--r--src/sim/fd_array.cc3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 0a0405fef..781bcdbf9 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -41,6 +41,7 @@
#include <algorithm>
#include <cassert>
#include <climits>
+#include <functional>
#include <iosfwd>
#include <memory>
#include <mutex>
diff --git a/src/sim/fd_array.cc b/src/sim/fd_array.cc
index 15cfe11ef..7f3f7dd24 100644
--- a/src/sim/fd_array.cc
+++ b/src/sim/fd_array.cc
@@ -131,8 +131,7 @@ FDArray::restoreFileOffsets()
* possible to guarantee that the simulation will proceed as it should
* have in the same way that it would have proceeded sans checkpoints.
*/
- void (*seek)(std::shared_ptr<FileFDEntry>)
- = [] (std::shared_ptr<FileFDEntry> ffd)
+ auto seek = [] (std::shared_ptr<FileFDEntry> ffd)
{
if (lseek(ffd->getSimFD(), ffd->getFileOffset(), SEEK_SET) < 0)
fatal("Unable to seek to location in %s", ffd->getFileName());