From f6f55f433780769c5af560417d48a3f0b7c05383 Mon Sep 17 00:00:00 2001 From: Albert Cahalan Date: Mon, 17 Jan 2005 15:51:40 +0000 Subject: [PATCH] there is a special place in Hell for the glibc developer who decided to discard the d_namlen value provided by the kernel, preventing normal user apps from using it --- src/tuxpaint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index caa944875..3bf7dcf6c 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -6253,10 +6253,9 @@ static void tp_ftw(char *restrict const dir, unsigned dirlen, int rsrc, #warning Failed to see DT_UNKNOWN #endif -#ifdef _DIRENT_HAVE_D_NAMLEN +#if defined(_DIRENT_HAVE_D_NAMLEN) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) int d_namlen = f->d_namlen; #else -#warning Failed to see _DIRENT_HAVE_D_NAMLEN int d_namlen = strlen(f->d_name); #endif int add_rsrc = 0;