all repos — cgit @ 25e8ba1996a7b5ea291c924b0990d706176f6fe6

a hyperfast web frontend for git written in c

ui-repolist: fix redefinition of _XOPEN_SOURCE

Previously, ui-repolist.c set _GNU_SOURCE and then included a standard
library before including <git-compat-util.h>.  This was a problem,
because <git-compat-util.h> redefined _XOPEN_SOURCE, which is set
automatically by glibc when _GNU_SOURCE is set.  However,
<git-compat-util.h> already sets _GNU_SOURCE and includes both
<string.h> and <time.h>, so there is no need to define _GNU_SOURCE or
include either header within ui-repolist.c.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Mark Lodato lodatom@gmail.com
Sat, 04 Sep 2010 11:49:30 -0400
commit

25e8ba1996a7b5ea291c924b0990d706176f6fe6

parent

e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2

1 files changed, 0 insertions(+), 6 deletions(-)

jump to
M ui-repolist.cui-repolist.c

@@ -6,12 +6,6 @@ * 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" #include "html.h" #include "ui-shared.h"