]> granicus.if.org Git - cgit/commitdiff
ui-repolist: avoid build warning for strcasestr(3)
authorLars Hjemli <hjemli@gmail.com>
Fri, 5 Dec 2008 18:04:17 +0000 (19:04 +0100)
committerLars Hjemli <hjemli@gmail.com>
Fri, 5 Dec 2008 18:04:17 +0000 (19:04 +0100)
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

index c23232c36ac1a02194ac8b3c0c833d9e0bc18725..2324273f8df7cc0a81ee787dd707b3047a4a350a 100644 (file)
@@ -6,6 +6,10 @@
  *   (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"