Skip to content

Commit

Permalink
Add basic errno support.
Browse files Browse the repository at this point in the history
Needed for hash table support; probably useful in a lot of other
places as well.

Signed-off-by: Wolfgang Denk <[email protected]>
  • Loading branch information
wdenx committed Sep 19, 2010
1 parent a2a649d commit 65cd3fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/errno.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _ERRNO_H

#include <asm-generic/errno.h>

extern int errno;

#define __set_errno(val) do { errno = val; } while (0)

#endif /* _ERRNO_H */
1 change: 1 addition & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ COBJS-y += crc32.o
COBJS-y += ctype.o
COBJS-y += display_options.o
COBJS-y += div64.o
COBJS-y += errno.o
COBJS-$(CONFIG_GZIP) += gunzip.o
COBJS-$(CONFIG_LMB) += lmb.o
COBJS-y += ldiv.o
Expand Down
1 change: 1 addition & 0 deletions lib/errno.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int errno = 0;

0 comments on commit 65cd3fa

Please sign in to comment.