[tin-dev] [tin 2.6.4] snapshots

Urs Janßen urs at tin.org
Thu May 2 19:51:55 CEST 2024


I wrote:
> New snapshots available.
[...]
>       ADD. configure check for dirfd(3)

for whatever reason I added this, it broke random-signature generation
(not the configure check, but the code it was used for).
I don't understand why, but as it has no benefits over the old code:
just nuke it again:

=== modified file 'src/sigfile.c'
--- old/src/sigfile.c	2024-03-21 09:55:03 +0000
+++ new/src/sigfile.c	2024-05-02 17:35:46 +0000
@@ -285,20 +285,7 @@
 			if (!strcmp(dp->d_name, CURRENTDIR) || (dp->d_name[0] == '.'))
 				dp = NULL;
 			else {	/* if we have a non-dot entry */
-#ifdef HAVE_DIRFD
-				int dfd = dirfd(dirp);
-
-				if (dfd < 0)
-					goto err_out;
-
-				if (fstat(dfd, &st) == -1)
-#else
-				if (stat(dp->d_name, &st) == -1)
-#endif /* HAVE_DIRFD */
-				{
-#ifdef HAVE_DIRFD
-err_out:
-#endif /* HAVE_DIRFD */
+				if (stat(dp->d_name, &st) == -1) {
 					CLOSEDIR(dirp);
 					free(cwd);
 					return 1;




More information about the tin-dev mailing list