mailing list of musl libc
 help / color / mirror / code / Atom feed
0f87c71bca98fb4d749c0d8e20427a6856d69974 blob 142 bytes (raw)

1
2
3
4
5
6
7
8
 
#include <stdlib.h>
#include <stdint.h>

size_t memalignment(const void *p)
{
	uintptr_t bits = (uintptr_t)p;
	return (bits^(bits-1))&bits;
}
debug log:

solving 0f87c71b ...
found 0f87c71b in https://inbox.vuxu.org/musl/0620da4a3eaadc604c8e7696d81f5c44dfcac6fb.1685527375.git.Jens.Gustedt@inria.fr/

applying [1/1] https://inbox.vuxu.org/musl/0620da4a3eaadc604c8e7696d81f5c44dfcac6fb.1685527375.git.Jens.Gustedt@inria.fr/
diff --git a/src/stdlib/memalignment.c b/src/stdlib/memalignment.c
new file mode 100644
index 00000000..0f87c71b

Checking patch src/stdlib/memalignment.c...
Applied patch src/stdlib/memalignment.c cleanly.

index at:
100644 0f87c71bca98fb4d749c0d8e20427a6856d69974	src/stdlib/memalignment.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).