mailing list of musl libc
 help / color / mirror / code / Atom feed
d7541da84356b0b3262b72a5c24c3d6215fe12bf blob 947 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
30
31
32
33
34
35
36
37
 
#include "time32.h"
#include <time.h>
#include <sys/time.h>
#include <sys/timex.h>
#include <string.h>
#include <stddef.h>

struct oldtimex {
	unsigned modes;
	long offset, freq, maxerror, esterror;
	int status;
	long constant, precision, tolerance;
	long time_sec, time_usec;
	long tick, ppsfreq, jitter;
	int shift;
	long stabil, jitcnt, calcnt, errcnt, stbcnt;
	int tai;
	int __padding[11];
};

int __adjtimex_time32(struct timex *tx32)
{
	struct timex utx;
	memcpy(&utx, tx32, sizeof(struct oldtimex));
	utx.time.tv_sec =
		*(long *)((char *)tx32 + offsetof(struct oldtimex,time_sec));
	utx.time.tv_usec =
		*(long *)((char *)tx32 + offsetof(struct oldtimex,time_usec));
	int r = adjtimex(&utx);
	if (r<0) return r;
	memcpy(tx32, &utx, sizeof(struct oldtimex));
	*(long *)((char *)tx32 + offsetof(struct oldtimex,time_sec)) =
		utx.time.tv_sec;
	*(long *)((char *)tx32 + offsetof(struct oldtimex,time_usec)) =
		utx.time.tv_usec;
	return r;
}
debug log:

solving d7541da8 ...
found d7541da8 in https://inbox.vuxu.org/musl/20190802214433.GA25193@brightrain.aerifal.cx/ ||
	https://inbox.vuxu.org/musl/20191021024643.GA6192@brightrain.aerifal.cx/ ||
	https://inbox.vuxu.org/musl/20191101202539.GA8982@brightrain.aerifal.cx/ ||
	https://inbox.vuxu.org/musl/20191102013911.GA26175@brightrain.aerifal.cx/

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

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

skipping https://inbox.vuxu.org/musl/20191021024643.GA6192@brightrain.aerifal.cx/ for d7541da8
skipping https://inbox.vuxu.org/musl/20191101202539.GA8982@brightrain.aerifal.cx/ for d7541da8
skipping https://inbox.vuxu.org/musl/20191102013911.GA26175@brightrain.aerifal.cx/ for d7541da8
index at:
100644 d7541da84356b0b3262b72a5c24c3d6215fe12bf	compat/time32/adjtimex_time32.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).