diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-03 20:50:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-03 20:50:20 +0300 |
commit | 88e2d16c070f480e1892044f329cd38df298003d (patch) | |
tree | afe3b092835b8afe3ab9f364efa0d154822ecfa8 /src | |
parent | 0bc270da9261a36527261432780ea30e8d39aff7 (diff) | |
download | manaverse-88e2d16c070f480e1892044f329cd38df298003d.tar.gz manaverse-88e2d16c070f480e1892044f329cd38df298003d.tar.bz2 manaverse-88e2d16c070f480e1892044f329cd38df298003d.tar.xz manaverse-88e2d16c070f480e1892044f329cd38df298003d.zip |
apply some OpenBSD fixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/logger.h | 4 | ||||
-rw-r--r-- | src/mumblemanager.cpp | 3 | ||||
-rw-r--r-- | src/utils/stringutils.h | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/logger.h b/src/logger.h index 32499ee49..8b484e8f5 100644 --- a/src/logger.h +++ b/src/logger.h @@ -76,8 +76,12 @@ class Logger final */ void log(const char *const log_text, ...) #ifdef __GNUC__ +#ifdef __OpenBSD__ + __attribute__((__format__(printf, 2, 3))) +#else __attribute__((__format__(gnu_printf, 2, 3))) #endif +#endif ; /** diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp index a96fcfe3e..06387cdf5 100644 --- a/src/mumblemanager.cpp +++ b/src/mumblemanager.cpp @@ -16,6 +16,9 @@ #include "utils/mathutils.h" +#ifdef __OpenBSD__ +#include <sys/param.h> +#endif #include <stdio.h> #include <stdlib.h> #include <wchar.h> 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 ; /** |