mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Use __typeof__ instead of typeof
Thiago Macieira compiles with -std=c++11.
This commit is contained in:
		
							parent
							
								
									aad1e19058
								
							
						
					
					
						commit
						5e078bfa5a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -40,8 +40,8 @@ extern "C" {
 | 
			
		|||
#define ALIGN(n, a) ( ((n) + ((a) - 1)) & ~((a) - 1) )
 | 
			
		||||
#define DIV_ROUNDUP(n, a) ( ((n) + ((a) - 1)) / (a) )
 | 
			
		||||
 | 
			
		||||
#define container_of(ptr, type, member) ({			\
 | 
			
		||||
	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
 | 
			
		||||
#define container_of(ptr, type, member) ({				\
 | 
			
		||||
	const __typeof__( ((type *)0)->member ) *__mptr = (ptr);	\
 | 
			
		||||
	(type *)( (char *)__mptr - offsetof(type,member) );})
 | 
			
		||||
 | 
			
		||||
struct wl_message {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue