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
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
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;
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;
char *mybase64(uint8_t digest[20])
{
static const char charz[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_";
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
uint8_t input[21];
static char output[28];
int i, j;
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;
}