summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/system.h')
-rw-r--r--apt-pkg/contrib/system.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/contrib/system.h b/apt-pkg/contrib/system.h
index b57093b93..a0580b218 100644
--- a/apt-pkg/contrib/system.h
+++ b/apt-pkg/contrib/system.h
@@ -77,4 +77,13 @@
#define __cold /* no cold marker */
#endif
+#ifdef __GNUG__
+// Methods have a hidden this parameter that is visible to this attribute
+ #define __like_printf_1 __attribute__ ((format (printf, 2, 3)))
+ #define __like_printf_2 __attribute__ ((format (printf, 3, 4)))
+#else
+ #define __like_printf_1
+ #define __like_printf_2
+#endif
+
#endif