termux-packages/packages/attr/walk_tree.c.patch

26 lines
783 B
Diff
Raw Normal View History

2021-05-01 06:25:14 +02:00
diff -u -r ../attr-2.5.1/libmisc/walk_tree.c ./libmisc/walk_tree.c
--- ../attr-2.5.1/libmisc/walk_tree.c 2021-03-11 18:14:35.000000000 +0000
+++ ./libmisc/walk_tree.c 2021-04-29 04:14:06.292962485 +0000
2021-05-01 06:02:24 +02:00
@@ -136,7 +136,11 @@
2015-12-13 21:04:49 +01:00
close_another_dir:
/* Close the topmost directory handle still open. */
2021-05-01 06:02:24 +02:00
args->closed = args->closed->prev;
2015-12-13 21:04:49 +01:00
+#ifdef __ANDROID__
2021-05-01 06:02:24 +02:00
+ args->closed->pos = -1;
2015-12-13 21:04:49 +01:00
+#else
2021-05-01 06:02:24 +02:00
args->closed->pos = telldir(args->closed->stream);
2015-12-13 21:04:49 +01:00
+#endif
2021-05-01 06:02:24 +02:00
closedir(args->closed->stream);
args->closed->stream = NULL;
args->num_dir_handles++;
@@ -206,7 +210,9 @@
NULL,
flags | WALK_TREE_FAILED,
args->arg);
2015-12-13 21:04:49 +01:00
+#ifndef __ANDROID__
seekdir(dir.stream, dir.pos);
+#endif
2021-05-01 06:02:24 +02:00
args->closed = args->closed->next;
args->num_dir_handles--;