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

Fix asprintf declaration #45

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

kaythomas0
Copy link
Contributor

The declaration of asprintf seems to be causing compilation issues on musl systems (see here). I'm also running into this issue while trying to package this for Alpine Linux. I believe this is because char *fmt isn't being declared as const in the function declaration, and I think it should be (see asprintf man page). This seems to fix the error: conflicting types for asprintf error that gets thrown while trying to compile on a musl system.

@kmatheussen kmatheussen merged commit c8c4df1 into kmatheussen:master Apr 30, 2021
@kmatheussen
Copy link
Owner

Thank you. That fix is fine. The real bug, though, seems to be this line:

  • #ifndef __USE_GNU
    #ifndef _USE_GNU

@kmatheussen
Copy link
Owner

Try again:

-#ifndef __USE_GNU
+#ifndef __USE_GNU

@kmatheussen
Copy link
Owner

(At least according to the man page, "_USE_GNU" should only have one underscore, not two.)

@kaythomas0
Copy link
Contributor Author

Ah yeah, good catch!

kmatheussen added a commit that referenced this pull request Apr 30, 2021
@kmatheussen
Copy link
Owner

Actually, I confused USE_GNU and GNU_SOURCE. I guess it's actually two underscores. Anyway, I just defined _GNU_SOURCE and removed the custom asprintf implementation altogether:
00c986d

orivej-nixos pushed a commit to NixOS/nixpkgs that referenced this pull request Nov 13, 2023
Fixes #263505 (broken build)

Upstream has fixed this in 2021 (kmatheussen/jack_capture#45)
but has made no releases since (kmatheussen/jack_capture#32)
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.

None yet

2 participants