Fix radeon distcheck.
[platform/upstream/libdrm.git] / intel / intel_bufmgr_fake.c
index 54b3cb8..bc4a2ff 100644 (file)
 #include "mm.h"
 #include "libdrm_lists.h"
 
+/* Support gcc's __FUNCTION__ for people using other compilers */
+#if !defined(__GNUC__) && !defined(__FUNCTION__)
+# define __FUNCTION__ __func__ /* C99 */
+#endif
+
 #define DBG(...) do {                                  \
        if (bufmgr_fake->bufmgr.debug)                  \
                drmMsg(__VA_ARGS__);                    \
@@ -294,10 +299,10 @@ _fence_wait_internal(drm_intel_bufmgr_fake *bufmgr_fake, int seq)
                return;
        }
 
-       DBG("wait 0x%08x\n", iw.irq_seq);
-
        iw.irq_seq = seq;
 
+       DBG("wait 0x%08x\n", iw.irq_seq);
+
        /* The kernel IRQ_WAIT implementation is all sorts of broken.
         * 1) It returns 1 to 0x7fffffff instead of using the full 32-bit
         *    unsigned range.