diff options
Diffstat (limited to 'klibc')
-rw-r--r-- | klibc/klibc.spec | 2 | ||||
-rw-r--r-- | klibc/klibc/Makefile | 2 | ||||
-rw-r--r-- | klibc/klibc/fread.c | 5 | ||||
-rw-r--r-- | klibc/klibc/fwrite.c | 7 | ||||
-rw-r--r-- | klibc/klibc/sha1hash.c | 2 | ||||
-rw-r--r-- | klibc/klibc/strncat.c | 6 | ||||
-rw-r--r-- | klibc/version | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/klibc/klibc.spec b/klibc/klibc.spec index 272e52bc1a..02131c7f25 100644 --- a/klibc/klibc.spec +++ b/klibc/klibc.spec @@ -1,6 +1,6 @@ Summary: A minimal libc subset for use with initramfs. Name: klibc -Version: 0.194 +Version: 0.198 Release: 1 License: BSD/GPL Group: Development/Libraries diff --git a/klibc/klibc/Makefile b/klibc/klibc/Makefile index d01b2e4326..8a9a68bcf7 100644 --- a/klibc/klibc/Makefile +++ b/klibc/klibc/Makefile @@ -59,7 +59,7 @@ LIB = libc.a INTERP_O = interp.o -all: tests $(CRT0) $(LIB) $(SOLIB) klibc.so +all: tests $(CRT0) $(LIB) $(SOLIB) $(SOHASH) $(INTERP_O) # Add any architecture-specific rules include arch/$(ARCH)/Makefile.inc diff --git a/klibc/klibc/fread.c b/klibc/klibc/fread.c index 8f7dba9c19..a49f0d8210 100644 --- a/klibc/klibc/fread.c +++ b/klibc/klibc/fread.c @@ -15,9 +15,10 @@ size_t _fread(void *buf, size_t count, FILE *f) while ( count ) { rv = read(fileno(f), p, count); if ( rv == -1 ) { - if ( errno == EINTR ) + if ( errno == EINTR ) { + errno = 0; continue; - else + } else break; } else if ( rv == 0 ) { break; diff --git a/klibc/klibc/fwrite.c b/klibc/klibc/fwrite.c index 0a73188c67..ad61c86b88 100644 --- a/klibc/klibc/fwrite.c +++ b/klibc/klibc/fwrite.c @@ -15,9 +15,10 @@ size_t _fwrite(const void *buf, size_t count, FILE *f) while ( count ) { rv = write(fileno(f), p, count); if ( rv == -1 ) { - if ( errno == EINTR ) - continue; - else + if ( errno == EINTR ) { + errno = 0; + continue; + } else break; } else if ( rv == 0 ) { break; diff --git a/klibc/klibc/sha1hash.c b/klibc/klibc/sha1hash.c index f81e08b17c..28e3399967 100644 --- a/klibc/klibc/sha1hash.c +++ b/klibc/klibc/sha1hash.c @@ -263,7 +263,7 @@ unsigned char finalcount[8]; char *mybase64(uint8_t digest[20]) { static const char charz[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; uint8_t input[21]; static char output[28]; int i, j; diff --git a/klibc/klibc/strncat.c b/klibc/klibc/strncat.c index 0dd9deb984..4d8458d5ec 100644 --- a/klibc/klibc/strncat.c +++ b/klibc/klibc/strncat.c @@ -12,14 +12,12 @@ char *strncat(char *dst, const char *src, size_t n) char ch; size_t nn = q-dst; - if ( __likely(nn <= n) ) - n -= nn; - while (n--) { *q++ = ch = *p++; if ( !ch ) - break; + return dst; } + *q = '\0'; return dst; } diff --git a/klibc/version b/klibc/version index 3759b0aad0..129efcc007 100644 --- a/klibc/version +++ b/klibc/version @@ -1 +1 @@ -0.196 +0.198 |