summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2014-06-20 06:50:04 +0000
committerjsg <jsg@openbsd.org>2014-06-20 06:50:04 +0000
commitd2ac73cebad979d266ed82444515f3247ebfb2b4 (patch)
tree702c1249af9bf26dfdc870c7c0adf7ca67e7ee58
parentInstead of showing the difference between a bad checksum and a good (diff)
downloadwireguard-openbsd-d2ac73cebad979d266ed82444515f3247ebfb2b4.tar.xz
wireguard-openbsd-d2ac73cebad979d266ed82444515f3247ebfb2b4.zip
sf@ pointed out that atom.c defines a DEBUG macro that takes arguments,
this breaks when compiling a kernel with DEBUG defined for additional printfs elsewhere. Instead of renaming the macro, undefine DEBUG before the new definition to minimise the diff the linux.
-rw-r--r--sys/dev/pci/drm/radeon/atom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon/atom.c b/sys/dev/pci/drm/radeon/atom.c
index 7bf79957c53..1129ef2a785 100644
--- a/sys/dev/pci/drm/radeon/atom.c
+++ b/sys/dev/pci/drm/radeon/atom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atom.c,v 1.3 2014/02/09 11:03:31 jsg Exp $ */
+/* $OpenBSD: atom.c,v 1.4 2014/06/20 06:50:04 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
*
@@ -90,6 +90,10 @@ static void debug_print_spaces(int n)
printf(" ");
}
+#ifdef DEBUG
+#undef DEBUG
+#endif
+
#define DEBUG(...) do if (atom_debug) { printf(__FILE__ __VA_ARGS__); } while (0)
#define SDEBUG(...) do if (atom_debug) { printf(__FILE__); debug_print_spaces(debug_depth); printf(__VA_ARGS__); } while (0)
#else