ccb7869e1708cde503bb0ac6e32584c51e45d40b
[oweals/u-boot.git] / include / errno.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2014 Samsung Electronics
4  * Przemyslaw Marczak <p.marczak@samsung.com>
5  */
6 #ifndef _ERRNO_H
7 #define _ERRNO_H
8
9 #include <linux/errno.h>
10
11 extern int errno;
12
13 #define __set_errno(val) do { errno = val; } while (0)
14
15 #ifdef CONFIG_ERRNO_STR
16 const char *errno_str(int errno);
17 #else
18 static inline const char *errno_str(int errno)
19 {
20         return 0;
21 }
22 #endif
23 #endif /* _ERRNO_H */