-D_BSD_SOURCE=1

This commit is contained in:
c9s 2014-06-02 07:03:32 +08:00
parent 7597398c08
commit b80f90dad9
2 changed files with 3 additions and 2 deletions

View file

@ -9,8 +9,9 @@ matrix:
env: CONFIGURE_OPTION='--enable-debug --enable-gcov --with-malloc=jemalloc' COVERALLS=yes VALGRIND=no DEBUG=yes env: CONFIGURE_OPTION='--enable-debug --enable-gcov --with-malloc=jemalloc' COVERALLS=yes VALGRIND=no DEBUG=yes
- compiler: gcc - compiler: gcc
env: CONFIGURE_OPTION='--enable-debug --enable-gcov' COVERALLS=yes VALGRIND=yes DEBUG=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ env: CONFIGURE_OPTION='--enable-debug --enable-gcov' COVERALLS=yes VALGRIND=yes DEBUG=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
# -D_BSD_SOURCE=1 is for asprintf
- compiler: clang - compiler: clang
env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/local/clang-3.4/bin/llvm-symbolizer CFLAGS='-fsanitize=address -g -O1' env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/local/clang-3.4/bin/llvm-symbolizer CFLAGS='-fsanitize=address -g -O1 -D_BSD_SOURCE=1'
install: install:
- sudo apt-get update -qq - sudo apt-get update -qq

View file

@ -624,7 +624,7 @@ node * r3_tree_insert_pathl_(node *tree, const char *path, int path_len, route *
r3_edge_branch(e, prefix_len); r3_edge_branch(e, prefix_len);
return r3_tree_insert_pathl_(e->child, subpath, subpath_len, route , data, errstr); return r3_tree_insert_pathl_(e->child, subpath, subpath_len, route , data, errstr);
} else { } else {
printf("unexpected route."); fprintf(stderr, "unexpected route.");
return NULL; return NULL;
} }
return n; return n;