/* Function attributes. If you're not using GCC to build then you'll need to
* say something different here.
*/
-#define PRINTF_LIKE(fmt, dots) __attribute__((format(printf, fmt, dots)))
-#define NORETURN __attribute__((noreturn))
+#if (defined(__GNUC__) && (__GNUC__ > 2 || \
+ (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))) || \
+ (defined(__clang__) && (__clang_major__ > 3 || \
+ (__clang_major__ == 3 && __clang_minor__ >= 3)))
+# define PRINTF_LIKE(fmt, dots) __attribute__((format(printf, fmt, dots)))
+# define NORETURN __attribute__((noreturn))
+#else
+# define PRINTF_LIKE(fmt, dots)
+# define NORETURN
+#endif
/*----- Definitions for low-level DVD access ------------------------------*/