Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: update .h for clock_adjtime #2085

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

clan
Copy link
Contributor

@clan clan commented Jan 13, 2025

man clock_adjtime: #include <sys/timex.h>
for glibc, if _GNU_SOURCE is defined, <time.h> will include <sys/timex.h> but not for musl, so replce <time.h> to <sys/timex.h>

PS it seems clock_adjtime is used nowhere?

clan added a commit to clan/gentoo that referenced this pull request Jan 13, 2025
1. patch submitted to upstream at unicorn-engine/unicorn#2085
2. malloc_trim is not available on musl only

Closes: https://bugs.gentoo.org/906919
Signed-off-by: Z. Liu <[email protected]>
@clan
Copy link
Contributor Author

clan commented Jan 13, 2025

include <sys/timex.h> works for musl, but not for glibc, checking why, although "man clock_adjtime" said so

@clan clan marked this pull request as draft January 13, 2025 11:45
@clan clan marked this pull request as ready for review January 13, 2025 11:56
clan added a commit to clan/gentoo that referenced this pull request Jan 13, 2025
1. patch submitted to upstream at unicorn-engine/unicorn#2085
2. malloc_trim is not available on musl only

Closes: https://bugs.gentoo.org/906919
Signed-off-by: Z. Liu <[email protected]>
@wtdcode
Copy link
Member

wtdcode commented Jan 13, 2025

Thanks for your interest but the patch shall go to dev branch.

for glibc, if _GNU_SOURCE is defined, <time.h> will include <sys/timex.h>
but not for musl, so add "#include <sys/timex.h>"

although `man clock_adjtime` said "#include <sys/timex.h>", but it won't
work for glibc w/o "#include <time.h>", I don't known why yet.

PS it seems clock_adjtime is used nowhere?

Signed-off-by: Z. Liu <[email protected]>
@clan
Copy link
Contributor Author

clan commented Jan 13, 2025

Thanks for your interest but the patch shall go to dev branch.

ok, I'll fix this

@clan clan changed the base branch from master to dev January 13, 2025 13:06
@wtdcode wtdcode merged commit a78d690 into unicorn-engine:dev Jan 14, 2025
36 checks passed
@wtdcode
Copy link
Member

wtdcode commented Jan 14, 2025

Thanks!

@clan clan deleted the configure branch January 14, 2025 02:10
clan added a commit to clan/gentoo that referenced this pull request Jan 14, 2025
1. patch merged by upstream at unicorn-engine/unicorn#2085
2. malloc_trim is not available on musl only

Closes: https://bugs.gentoo.org/906919
Signed-off-by: Z. Liu <[email protected]>
hyunmin-furiosa pushed a commit to hyunmin-furiosa/unicorn that referenced this pull request Jan 17, 2025
…e#2085)

for glibc, if _GNU_SOURCE is defined, <time.h> will include <sys/timex.h>
but not for musl, so add "#include <sys/timex.h>"

although `man clock_adjtime` said "#include <sys/timex.h>", but it won't
work for glibc w/o "#include <time.h>", I don't known why yet.

PS it seems clock_adjtime is used nowhere?

Signed-off-by: Z. Liu <[email protected]>
clan added a commit to clan/gentoo that referenced this pull request Jan 20, 2025
1. patch merged by upstream at unicorn-engine/unicorn#2085
2. malloc_trim is not available on musl only

Closes: https://bugs.gentoo.org/906919
Signed-off-by: Z. Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants