summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-04-03 16:56:07 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-04-03 16:56:07 +0200
commit00cb54c9531737d542cc366cc9596a498c8d1ef6 (patch)
tree41175b3d17cec8f476df5a066f1a4f15ebb3e533
parentb7bf3331cbae60d55c41da7693c25aa07c4463f5 (diff)
downloadratpoison-00cb54c9531737d542cc366cc9596a498c8d1ef6.zip
Avoid useless deprecation warnings
Looks like strcasestr was actually a GNU extension, so using _BSD_SOURCE doesn't make sense. POSIX declares it in strings.h, glibc-2.25 and older declare it in string.h if _GNU_SOURCE is defined.
-rw-r--r--src/completions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/completions.c b/src/completions.c
index 70a86d0..b06db2b 100644
--- a/src/completions.c
+++ b/src/completions.c
@@ -18,7 +18,11 @@
* Boston, MA 02111-1307 USA
*/
-#define _BSD_SOURCE
+#include <strings.h>
+/*
+ * Per POSIX strcasestr should be declared in strings.h
+ * glibc declares it in string.h instead.
+ */
#define _GNU_SOURCE
#include <string.h>