mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-31 03:58:17 +00:00 
			
		
		
		
	The pmic framework uses errno_str() and this requires board that use it to enable CONFIG_ERRNO_STR to avoid a build error. Update the header to provide a NULL error message when CONFIG_ERRNO_STR is not defined, and fix the build error. This will show as "(null)" when U-Boot prints it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			432 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			432 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Copyright (C) 2014 Samsung Electronics
 | |
|  * Przemyslaw Marczak <p.marczak@samsung.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier:	GPL-2.0+
 | |
|  */
 | |
| #ifndef _ERRNO_H
 | |
| #define _ERRNO_H
 | |
| 
 | |
| #include <asm-generic/errno.h>
 | |
| 
 | |
| extern int errno;
 | |
| 
 | |
| #define __set_errno(val) do { errno = val; } while (0)
 | |
| 
 | |
| #ifdef CONFIG_ERRNO_STR
 | |
| const char *errno_str(int errno);
 | |
| #else
 | |
| static inline const char *errno_str(int errno)
 | |
| {
 | |
| 	return 0;
 | |
| }
 | |
| #endif
 | |
| #endif /* _ERRNO_H */
 |