diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index 3b4180f..30d678c 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -19,17 +19,24 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
+#include
+
#ifdef GDBSERVER
-#include "server.h"
+#include "build-gnulib-gdbserver/config.h"
#else
-#include "defs.h"
+#include "build-gnulib/config.h"
#endif
+#include "common-types.h"
+#include "common-utils.h"
+#include "target/waitstatus.h"
+#include "errors.h"
+#include "gdb_locale.h"
+#include "gdb_signals.h"
#include "linux-btrace.h"
#include "common-utils.h"
#include "gdb_assert.h"
#include "regcache.h"
-#include "gdbthread.h"
#include "gdb_wait.h"
#include "i386-cpuid.h"
#include "common-regcache.h"
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
index 12e9b60..e237eea 100644
--- a/gdb/nat/linux-btrace.h
+++ b/gdb/nat/linux-btrace.h
@@ -22,6 +22,8 @@
#ifndef LINUX_BTRACE_H
#define LINUX_BTRACE_H
+struct target_ops;
+
#include "btrace-common.h"
#include "config.h"
#include "vec.h"