diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/resolv.c | 6 | ||||
-rw-r--r-- | libc/unistd/confstr.c | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 9459199da..84289a619 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -905,8 +905,8 @@ __UCLIBC_MUTEX_INIT(__resolv_lock, PTHREAD_MUTEX_INITIALIZER); /* Protected by __resolv_lock */ void (*__res_sync)(void); /*uint32_t __resolv_opts; */ -uint8_t __resolv_timeout; -uint8_t __resolv_attempts; +uint8_t __resolv_timeout = RES_TIMEOUT; +uint8_t __resolv_attempts = RES_DFLRETRY; unsigned __nameservers; unsigned __searchdomains; sockaddr46_t *__nameserver; @@ -1062,8 +1062,6 @@ void attribute_hidden __open_nameservers(void) if (p == NULL || (p1 = strchr(p, ':')) == NULL) continue; *p1++ = '\0'; - if (p1 == NULL) - continue; if (strcmp(p, "timeout") == 0) what = &__resolv_timeout; else if (strcmp(p, "attempts") == 0) diff --git a/libc/unistd/confstr.c b/libc/unistd/confstr.c index 8cd4ac59e..fc0bd599e 100644 --- a/libc/unistd/confstr.c +++ b/libc/unistd/confstr.c @@ -24,7 +24,6 @@ #define CS_PATH "/bin:/usr/bin" -#define QUOTEME(x) #x /* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes of BUF with the value corresponding to NAME and zero-terminate BUF. @@ -53,11 +52,13 @@ size_t confstr (int name, char *buf, size_t len) string_len = sizeof("linuxthreads-x.xx"); # elif defined __UCLIBC_HAS_THREADS_NATIVE__ # define __NPTL_VERSION ("NPTL " \ - QUOTEME(__UCLIBC_MAJOR__) "." \ - QUOTEME(__UCLIBC_MINOR__) "." \ - QUOTEME(__UCLIBC_SUBLEVEL__) ) + __stringify(__UCLIBC_MAJOR__) "." \ + __stringify(__UCLIBC_MINOR__) "." \ + __stringify(__UCLIBC_SUBLEVEL__)) string = __NPTL_VERSION; string_len = sizeof(__NPTL_VERSION); +# else +# error unable to determine thread impl # endif break; #endif |