--- ext/standard/dns.c
+++ ext/standard/dns.c
@@ -333,7 +333,7 @@
  *   __libc_res_nsend()   in resolv/res_send.c
  * */
 
-#if defined(__GLIBC__) && !defined(HAVE_DEPRECATED_DNS_FUNCS)
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(HAVE_DEPRECATED_DNS_FUNCS)
 #define php_dns_free_res(__res__) _php_dns_free_res(__res__)
 static void _php_dns_free_res(struct __res_state res) { /* {{{ */
 	int ns;
--- ext/sqlite3/libsqlite/sqlite3.c
+++ ext/sqlite3/libsqlite/sqlite3.c
@@ -17338,7 +17338,7 @@
 /*
 ** The backtrace functionality is only available with GLIBC
 */
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
   extern int backtrace(void**,int);
   extern void backtrace_symbols_fd(void*const*,int,int);
 #else
