diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-06-17 21:45:55 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-06-17 21:45:55 +0000 |
commit | bf962092548917d88b7a4368dbb36977777836da (patch) | |
tree | afc2796a4055fc19de4ebb0ff1d2fbe67f3c1a52 /sim/common/sim-memopt.c | |
parent | 78e731cd36da5f52b759bbf36cc1eb5d79de38c8 (diff) | |
download | gdb-bf962092548917d88b7a4368dbb36977777836da.zip gdb-bf962092548917d88b7a4368dbb36977777836da.tar.gz gdb-bf962092548917d88b7a4368dbb36977777836da.tar.bz2 |
* sim-memopt.c: Include <unistd.h>.
(do_memopt_add): Fix printf format.
* sim-events.c (sim_events_schedule): Initialize ``dummy''.
Diffstat (limited to 'sim/common/sim-memopt.c')
-rw-r--r-- | sim/common/sim-memopt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c index a8e9df6..d66dc1e 100644 --- a/sim/common/sim-memopt.c +++ b/sim/common/sim-memopt.c @@ -46,6 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif /* Memory fill byte. */ static unsigned8 fill_byte_value; @@ -167,7 +170,7 @@ do_memopt_add (SIM_DESC sd, { sim_io_error (sd, "Error, cannot confirm that mmap file is large enough " - "(>= %d bytes)\n", bytes); + "(>= %ld bytes)\n", bytes); } free_buffer = mmap (0, bytes, PROT_READ|PROT_WRITE, MAP_SHARED, mmap_next_fd, 0); |