mailing list of musl libc
 help / color / mirror / code / Atom feed
a16e2700e4f73d08a8a2a9f94186b58e73d56363 blob 941 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
 
#include "time32.h"
#include <time.h>
#include <sys/timerfd.h>

int __timerfd_settime32(int t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32)
{
	struct itimerspec old;
	int r = timerfd_settime(t, flags, (&(struct itimerspec){
		.it_interval.tv_sec = val32->it_interval.tv_sec,
		.it_interval.tv_nsec = val32->it_interval.tv_nsec,
		.it_value.tv_sec = val32->it_value.tv_sec,
		.it_value.tv_nsec = val32->it_value.tv_nsec}), &old);
	if (r) return r;
	/* The above call has already committed to success by changing the
	 * timer setting, so we can't fail on out-of-range old value.
	 * Since these are relative times, values large enough to overflow
	 * don't make sense anyway. */
	old32->it_interval.tv_sec = old.it_interval.tv_sec;
	old32->it_interval.tv_nsec = old.it_interval.tv_nsec;
	old32->it_value.tv_sec = old.it_value.tv_sec;
	old32->it_value.tv_nsec = old.it_value.tv_nsec;
	return 0;
}
debug log:

solving a16e2700 ...
found a16e2700 in https://inbox.vuxu.org/musl/20190802214433.GA25193@brightrain.aerifal.cx/

applying [1/1] https://inbox.vuxu.org/musl/20190802214433.GA25193@brightrain.aerifal.cx/
diff --git a/compat/time32/timerfd_settime32.c b/compat/time32/timerfd_settime32.c
new file mode 100644
index 00000000..a16e2700

Checking patch compat/time32/timerfd_settime32.c...
Applied patch compat/time32/timerfd_settime32.c cleanly.

index at:
100644 a16e2700e4f73d08a8a2a9f94186b58e73d56363	compat/time32/timerfd_settime32.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).