gallium/util: don't call close() on Windows in u_tests.c
authorBrian Paul <brianp@vmware.com>
Tue, 17 Oct 2017 19:59:28 +0000 (13:59 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 23 Oct 2017 21:10:44 +0000 (15:10 -0600)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/util/u_tests.c

index 3cc79afcffdf5720513e4308ac1463ffde45c5ed..2548b464b34930c3a6b4a2ae9ac8f1c348b985e3 100644 (file)
@@ -567,6 +567,7 @@ test_sync_file_fences(struct pipe_context *ctx)
    pass = pass && screen->fence_finish(screen, NULL, final_fence, 0);
 
    /* Cleanup. */
+#ifndef PIPE_OS_WINDOWS
    if (buf_fd >= 0)
       close(buf_fd);
    if (tex_fd >= 0)
@@ -575,6 +576,7 @@ test_sync_file_fences(struct pipe_context *ctx)
       close(merged_fd);
    if (final_fd >= 0)
       close(final_fd);
+#endif
 
    screen->fence_reference(screen, &buf_fence, NULL);
    screen->fence_reference(screen, &tex_fence, NULL);