← Commit list

0960ca738

Rob Landley
Rob Landley
2006-06-13
SOURCE BUG Duration: 35s

Subject

Work around a persistent uClibc bug, since 0.9.29 still hasn't shipped. Poked to do this by Jason Schoon.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mdev.c+6 -5
@@ -197,17 +197,18 @@ static void find_dev(char *path)
return;
while ((entry = readdir(dir)) != NULL) {
+ struct stat st;
/* Skip "." and ".." (also skips hidden files, which is ok) */
if (entry->d_name[0] == '.')
continue;
- if (entry->d_type == DT_DIR) {
- snprintf(path+len, PATH_MAX-len, "/%s", entry->d_name);
- find_dev(path);
- path[len] = 0;
- }
+ // uClibc doesn't fill out entry->d_type reliably. so we use lstat().
+
+ snprintf(path+len, PATH_MAX-len, "/%s", entry->d_name);
+ if (!lstat(path, &st) && S_ISDIR(st.st_mode)) find_dev(path);
+ path[len] = 0;
/* If there's a dev entry, mknod it */