aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/lynx-low.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-09-13 19:10:19 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-09-13 19:10:19 +0000
commit1adfc54d0c2b678885eb0a067de7377e3e2b5953 (patch)
tree2c5f3d605cd4873291053391b9ec9359d1a755b3 /gdb/gdbserver/lynx-low.c
parent7d288aaabf36bc30d27a8fee6d56a6e31daeab92 (diff)
downloadgdb-1adfc54d0c2b678885eb0a067de7377e3e2b5953.zip
gdb-1adfc54d0c2b678885eb0a067de7377e3e2b5953.tar.gz
gdb-1adfc54d0c2b678885eb0a067de7377e3e2b5953.tar.bz2
[LynxOS] Include sys/ptrace.h instead of ptrace.h.
This is one of the changes needed in order to build gdbserver on LynxOS 5.x. Really interesting: On LynxOS 4.x, there is a #warning when sys/ptrace.h is used (explaining that ptrace.h will be used instead), whereas this file was removed from LynxOS 5.x. The contents of sys/ptrace.h on 4.x (or at least the meat of it): #if defined(__GNUC__) || defined(__GNUG__) #if !defined(__NO_INCLUDE_WARN__) #warning Using <ptrace.h> instead of <sys/ptrace.h> #endif /* defined(__NO_INCLUDE_WARN__) */ #endif /* defined(__GNUC__) || defined(__GNUG__) */ #include <ptrace.h> The fix I went for, for now, is to just include <sys/ptrace.h> unconditionally. I could have done some configury, but we already have to build with -D__NO_INCLUDE_WARN__ to avoid the warnings anyway, and that's unvoidable, due to system includes themselves including the "wrong" header file. Since <sys/ptrace.h> seems to be the choice that was made for LynxOS, and since it works to include it on LynxOS 4.x, I think that's the simplest solution. gdb/gdbserver/ChangeLog: * lynx-low.c, lynx-ppc-low.c: Include <sys/ptrace.h> instead of <ptrace.h>
Diffstat (limited to 'gdb/gdbserver/lynx-low.c')
-rw-r--r--gdb/gdbserver/lynx-low.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c
index 7a949c0..74d2bcd 100644
--- a/gdb/gdbserver/lynx-low.c
+++ b/gdb/gdbserver/lynx-low.c
@@ -20,7 +20,7 @@
#include "lynx-low.h"
#include <limits.h>
-#include <ptrace.h>
+#include <sys/ptrace.h>
#include <sys/piddef.h> /* Provides PIDGET, TIDGET, BUILDPID, etc. */
#include <unistd.h>
#include <sys/ioctl.h>