From: naota Date: Tue, 27 Nov 2012 22:54:08 +0000 (+0900) Subject: Include sys/stat.h to define S_* properly X-Git-Tag: v1.9~94^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fa295d99ded94d90cabc0dfe7737b7e8f617d9d;p=taglib Include sys/stat.h to define S_* properly Without including sys/stat.h, this file failed to build on FreeBSD with the following error. In file included from /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/test_trueaudio.cpp:5:0: /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h: In function 'std::string copyFile(const string&, const string&)': /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:62: error: 'S_IRUSR' was not declared in this scope /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:72: error: 'S_IWUSR' was not declared in this scope In file included from /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/test_mpeg.cpp:6:0: /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h: In function 'std::string copyFile(const string&, const string&)': /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:62: error: 'S_IRUSR' was not declared in this scope /var/tmp/portage/media-libs/taglib-1.8/work/taglib-1.8/tests/utils.h:36:72: error: 'S_IWUSR' was not declared in this scope gmake[2]: *** [tests/CMakeFiles/test_runner.dir/test_mpeg.cpp.o] Error 1 --- diff --git a/tests/utils.h b/tests/utils.h index 39e15ce9..b69bfa50 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -7,6 +7,7 @@ #include #include #include +#include #endif #include #include