summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-10-30 15:27:04 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-10-30 15:27:04 +0100
commit3deb7268fa2041849b7e69e01545f5df4157c5a0 (patch)
tree3b3198fdb971e9c63f075348d4c1855736b41af5
parent93eade5fc5346b11805fa13db6147409d4932b03 (diff)
downloadc-files-3deb7268fa2041849b7e69e01545f5df4157c5a0.tar.gz
timeadd: fix build with older GCC
-rw-r--r--Makefile3
-rw-r--r--timeadd.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c5daf30..0e3123b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@ XCBV_LDFLAGS += $(shell pkg-config --libs xcb-image xpm) -lrt
RGB_TXT := /usr/share/vim/vim73/rgb.txt
+timeadd: timeadd.c
+ $(CC) -g -Wall -Werror -Wextra $(CFLAGS) -o $(OUTDIR)$@ $< -lrt
+
xcbviewfs: xcbviewfs.c colorlookup.c
$(CC) $(XCBV_CFLAGS) -o $@ $< colorlookup.c $(XCBV_LDFLAGS)
diff --git a/timeadd.c b/timeadd.c
index d2f0159..e43c951 100644
--- a/timeadd.c
+++ b/timeadd.c
@@ -36,7 +36,7 @@ struct timespec timediff(struct timespec begin, struct timespec end) {
int main(int argc, char **argv) {
const char *out_format;
char buf[4096];
- struct timespec tp[2] = { { 0 } };
+ struct timespec tp[2] = { { 0, 0 } };
int tp_i = 0;
int opt;
bool diff = false;