cgit

commit 7115f7d257b5e3fb5d5d7ad6299214506fb35042

Author: Lars Hjemli <hjemli@gmail.com>

ui-repolist: avoid build warning for strcasestr(3)

The non-standard function strcasestr is only defined if _GNU_SOURCE has
also been defined.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>

 ui-repolist.c | 4 ++++


diff --git a/ui-repolist.c b/ui-repolist.c
index c23232c36ac1a02194ac8b3c0c833d9e0bc18725..2324273f8df7cc0a81ee787dd707b3047a4a350a 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -6,6 +6,10 @@  * Licensed under GNU General Public License v2
  *   (see COPYING for full license text)
  */
 
+/* This is needed for strcasestr to be defined by <string.h> */
+#define _GNU_SOURCE 1
+#include <string.h>
+
 #include <time.h>
 
 #include "cgit.h"