mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-03 19:47:15 +00:00 
			
		
		
		
	lib/drmtest: Get the correct basename() under Android
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
		
							parent
							
								
									5032e7bbdd
								
							
						
					
					
						commit
						235ff9cf34
					
				@ -26,7 +26,11 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef ANDROID
 | 
			
		||||
#define _GNU_SOURCE
 | 
			
		||||
#else
 | 
			
		||||
#include <libgen.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
@ -1007,7 +1011,7 @@ static bool run_under_gdb(void)
 | 
			
		||||
 | 
			
		||||
	sprintf(buf, "/proc/%d/exe", getppid());
 | 
			
		||||
	return (readlink (buf, buf, sizeof (buf)) != -1 &&
 | 
			
		||||
		strncmp (basename (buf), "gdb", 3) == 0);
 | 
			
		||||
		strncmp(basename(buf), "gdb", 3) == 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void __igt_fail_assert(int exitcode, const char *file,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user