[Mesa-dev] [RFC libdrm 3/5] android: Mark alloc_handle_t magic variable as const

Robert Foss robert.foss at collabora.com
Wed Dec 13 17:30:12 UTC 2017


Mark magic member of alloc_handle_t as const.
Also bump the version of alloc_handle_t.

Sign-off-by: Robert Foss <robert.foss at collabora.com>
---
 android/alloc_handle.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/alloc_handle.h b/android/alloc_handle.h
index b722615638e7..fe93ad7e6567 100644
--- a/android/alloc_handle.h
+++ b/android/alloc_handle.h
@@ -32,7 +32,7 @@ struct alloc_handle_t {
 	native_handle_t base;
 
 	/* api variables */
-	int magic; /* differentiate between allocator impls */
+	const int magic; /* differentiate between allocator impls */
 	const int version; /* api version */
 
 	int prime_fd; /* dma-buf file descriptor */
@@ -52,7 +52,7 @@ struct alloc_handle_t {
 	} __attribute__((aligned(8)));
 };
 
-#define ALLOC_HANDLE_VERSION 1
+#define ALLOC_HANDLE_VERSION 2
 #define ALLOC_HANDLE_MAGIC 0x60585350
 #define ALLOC_HANDLE_NUM_FDS 1
 #define ALLOC_HANDLE_NUM_INTS (	\
-- 
2.14.1



More information about the mesa-dev mailing list