From 88e2d16c070f480e1892044f329cd38df298003d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Jun 2013 20:50:20 +0300 Subject: apply some OpenBSD fixes. --- src/utils/stringutils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils') diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index 0f9599f03..eae73ce40 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -99,8 +99,12 @@ std::string strprintf(const char *const format, ...) A_WARN_UNUSED #ifdef __GNUC__ /* This attribute is nice: it even works through gettext invokation. For example, gcc will complain that strprintf(_("%s"), 42) is ill-formed. */ +#ifdef __OpenBSD__ + __attribute__((__format__(printf, 1, 2))) +#else __attribute__((__format__(gnu_printf, 1, 2))) #endif +#endif ; /** -- cgit v1.2.3-70-g09d2