Include <cmath> in dwarf-index-write.c
authorTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 14:55:13 +0000 (08:55 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 14:55:13 +0000 (08:55 -0600)
On x86-64 Fedora 26, when building with the system gcc, I get:

../../binutils-gdb/gdb/dwarf-index-write.c: In member function ‘void debug_names::build()’:
../../binutils-gdb/gdb/dwarf-index-write.c:705:13: error: ‘pow’ is not a member of ‘std’

There are actually more messages, but this is sufficient to show the
problem.

The fix is to include <cmath>.

I'm checking this in as obvious.  Tested by building.

gdb/ChangeLog
2018-03-27  Tom Tromey  <tom@tromey.com>

* dwarf-index-write.c: Include <cmath>.

gdb/ChangeLog
gdb/dwarf-index-write.c

index 79c981de219f57c4f533b4774362db6dde9ae72b..8cbb7259b2ef491d5dd1ff650df282478145f727 100644 (file)
@@ -1,3 +1,7 @@
+2018-03-27  Tom Tromey  <tom@tromey.com>
+
+       * dwarf-index-write.c: Include <cmath>.
+
 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
 
        * NEWS: Add entry describing new "set|show varsize-limit" command.
index 3059e0b776a311223b777a9331be91c7f1ba4c2a..058712d9e22d0b3fa44f583e3624128aeebfcd91 100644 (file)
@@ -34,6 +34,7 @@
 #include "psympriv.h"
 
 #include <algorithm>
+#include <cmath>
 #include <set>
 #include <unordered_map>
 #include <unordered_set>