mailing list of musl libc
 help / color / mirror / code / Atom feed
b1fa4727677688650a9eadd5f481e117b8129928 blob 529 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include "__dirent.h"
#include "lock.h"

int readdir_r(DIR *restrict dir, struct dirent *restrict buf, struct dirent **restrict result)
{
	struct dirent *de;
	int errno_save = errno;
	int ret;

	LOCK(dir->lock);
	errno = 0;
	de = readdir(dir);
	if ((ret = errno)) {
		UNLOCK(dir->lock);
		return ret;
	}
	errno = errno_save;
	if (de) memcpy(buf, de, de->d_reclen);
	else buf = NULL;

	UNLOCK(dir->lock);
	*result = buf;
	return 0;
}

weak_alias(readdir_r, readdir64_r);
debug log:

solving b1fa4727 ...
found b1fa4727 in https://inbox.vuxu.org/musl/20220503155655.11222-2-jmaselbas@kalray.eu/ ||
	https://inbox.vuxu.org/musl/20220504122426.11529-2-jmaselbas@kalray.eu/
found e2a818f3 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 e2a818f36a0c66b398e8b0fc1622859605e1c434	src/dirent/readdir_r.c

applying [1/2] https://inbox.vuxu.org/musl/20220503155655.11222-2-jmaselbas@kalray.eu/
diff --git a/src/dirent/readdir_r.c b/src/dirent/readdir_r.c
index e2a818f3..b1fa4727 100644

Checking patch src/dirent/readdir_r.c...
Applied patch src/dirent/readdir_r.c cleanly.

skipping https://inbox.vuxu.org/musl/20220504122426.11529-2-jmaselbas@kalray.eu/ for b1fa4727
index at:
100644 b1fa4727677688650a9eadd5f481e117b8129928	src/dirent/readdir_r.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).