From 0236b16114dda5faf3dccabee147dfdd55c256ce Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Wed, 16 Nov 2016 01:50:48 +0800 Subject: include config.h to allow using getline on freebsd We need _GNU_SOURCE macro defined in config.h to enable the declaration of getline in FreeBSD stdio.h. https://github.com/libpinyin/libpinyin/issues/65 --- tests/test_pinyin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_pinyin.cpp') diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp index d0fb9f3..01e60c5 100644 --- a/tests/test_pinyin.cpp +++ b/tests/test_pinyin.cpp @@ -19,6 +19,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pinyin.h" #include #include -- cgit