]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix warning of implicit declaration of function 'strcasestr'
authorSZ Lin (林上智) <szlin@debian.org>
Tue, 15 Jan 2019 06:58:38 +0000 (14:58 +0800)
committerSZ Lin (林上智) <szlin@debian.org>
Tue, 15 Jan 2019 08:17:07 +0000 (16:17 +0800)
According to manpage of strcasestr [1], the macro function needs to be added.

[1] https://linux.die.net/man/3/strcasestr

Signed-off-by: SZ Lin (林上智) <szlin@debian.org>
src/nnn.c

index 67eb9bcfbf6a63fefa4733fd5df85f3b3497cf62..d3d09478aa1cfcbe99de638faed919e497dd09df 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -29,6 +29,9 @@
  */
 
 #ifdef __linux__
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
 #if defined(__arm__) || defined(__i386__)
 #define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit */
 #endif