summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/spu-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.arch/spu-info.c')
-rw-r--r--gdb/testsuite/gdb.arch/spu-info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.arch/spu-info.c b/gdb/testsuite/gdb.arch/spu-info.c
index e96bc9c937a..e97a0f76496 100644
--- a/gdb/testsuite/gdb.arch/spu-info.c
+++ b/gdb/testsuite/gdb.arch/spu-info.c
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <unistd.h>
#include <spu_mfcio.h>
@@ -190,14 +191,14 @@ do_signal_test ()
fd = open_context_file (context_fd, "signal1", O_RDWR);
if (fstat (fd, &fdstat) != 0)
return -1;
- ret = write (fd, buf, sizeof (int));
+ ret = write (fd, &buf, sizeof (int));
close (fd); /* Marker Signal1 */
/* Write to signal2. */
fd = open_context_file (context_fd, "signal2", O_RDWR);
if (fstat (fd, &fdstat) != 0)
return -1;
- ret = write (fd, buf, sizeof (int));
+ ret = write (fd, &buf, sizeof (int));
close (fd); /* Marker Signal2 */
/* Read signal1. */