summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-10-14 21:09:21 +0800
committersakumisu <[email protected]>2022-10-14 21:09:21 +0800
commit3b318d1eeac17fa1e37df840221b6e8f13e2b4b4 (patch)
treebbf25427c6fd8e924c2970b2a3eb3e3f8b319de6
parent7bcd8d0532774b6875713fa999ece2374c2ad870 (diff)
add config for system errno.h
-rw-r--r--common/usb_errno.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/common/usb_errno.h b/common/usb_errno.h
index aef08e51..f43a9896 100644
--- a/common/usb_errno.h
+++ b/common/usb_errno.h
@@ -22,18 +22,10 @@
* environment as necessary to access the TLS-based errno variable.
*/
-#define errno *__errno()
-#define set_errno(e) \
- do \
- { \
- errno = (int)(e); \
- } \
- while (0)
-#define get_errno() errno
-
/* Definitions of error numbers and the string that would be
* returned by strerror().
*/
+#ifndef CONFIG_USB_ERROR_USE_SYSTEM
#define EPERM 1
#define EPERM_STR "Operation not permitted"
@@ -296,7 +288,9 @@
#define ESTRPIPE_STR "Streams pipe error"
#define __ELASTERROR 2000 /* Users can add values starting here */
-
+#else
+#include <errno.h>
+#endif
/****************************************************************************
* Public Type Definitions
****************************************************************************/