aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-07-05 21:50:12 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2018-07-05 21:50:18 -0400
commit6821842f15efaec045d9e38f115af01ddffdaede (patch)
tree2e64115941ffb6d85ebb15f0104e9965cb8bd7c5 /include
parentbb11866d6a635fadb9285d18e2fb819d2de2c28c (diff)
downloadgdb-6821842f15efaec045d9e38f115af01ddffdaede.zip
gdb-6821842f15efaec045d9e38f115af01ddffdaede.tar.gz
gdb-6821842f15efaec045d9e38f115af01ddffdaede.tar.bz2
darwin: Silence syscall deprecated declaration warning
This patch silences this warning: /Users/simark/src/binutils-gdb/gdb/darwin-nat.c:839:10: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations] res = syscall (SYS___pthread_kill, thread->gdb_port, nsignal); ^ /usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here int syscall(int, ...); ^ The comment of the new pthread_kill function explains why we use the syscall function directly. include/ChangeLog: * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS): Define for clang. gdb/ChangeLog: * darwin-nat.c (darwin_pthread_kill): New function. (darwin_resume_thread): Use darwin_pthread_kill.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/diagnostics.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index de80801..e7d6d66 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS):
+ Define for clang.
+
2018-07-02 Maciej W. Rozycki <macro@mips.com>
PR tdep/8282
diff --git a/include/diagnostics.h b/include/diagnostics.h
index 4a67410..34fc01b 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -35,6 +35,8 @@
#if defined (__clang__) /* clang */
# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
+# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \
+ DIAGNOSTIC_IGNORE ("-Wdeprecated-declarations")
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
@@ -56,6 +58,10 @@
# define DIAGNOSTIC_IGNORE_SELF_MOVE
#endif
+#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
+# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
+#endif
+
#ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
#endif