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

NetBSD fixes #2053

Merged
merged 10 commits into from
May 19, 2024
Merged

NetBSD fixes #2053

merged 10 commits into from
May 19, 2024

Conversation

0-wiz-0
Copy link
Contributor

@0-wiz-0 0-wiz-0 commented May 3, 2024

I've ported libindi to pkgsrc and needed these patches to fix the build on NetBSD. Please review and apply them.
Thanks.

0-wiz-0 added 7 commits May 3, 2024 13:33
This variable handles different operating systems correctly.
On some, like NetBSD, there is no libdl and the code is in libc.
Fixes error about missing B576000 symbol.
NetBSD has mremap, but no MREMAP_MAYMOVE.
This should probably be done for other *BSDs too.
TODO: Add a cmake check for it?
It's a C library standard header, and it's needed for va_*.
@knro
Copy link
Contributor

knro commented May 5, 2024

@0-wiz-0 Please check the errors in the build

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented May 5, 2024

I had a typo in the __linux__ macro, sorry for that.

There is however other fallout that looks unrelated:

Debian:

Run indi/scripts/indi-core-deb.sh
/__w/indi/indi/build/deb_indi-core /__w/indi/indi
make: dh_listpackages: No such file or directory
make: dh_listpackages: No such file or directory
make: Nothing to be done for 'binary'.
/__w/indi/indi/build/deb_indi-core
/__w/indi/indi

Available packages:
ls: cannot access 'build/*.deb': No such file or directory
Error: Process completed with exit code 2.

Fedora:

[  4%] Linking CXX executable fakedriver
/__w/indi/indi/indi/libs/dsp/stream.c: In function 'dsp_stream_new':
/__w/indi/indi/indi/libs/dsp/stream.c:132:19: error: allocation of insufficient size '0' for type 'dsp_t' {aka 'double'} with size '8' [-Werror=alloc-size]
  132 |     stream->buf = (dsp_t*)malloc(sizeof(dsp_t) * 0);
      |                   ^
/__w/indi/indi/indi/libs/dsp/stream.c:133:23: error: allocation of insufficient size '0' for type 'double' with size '8' [-Werror=alloc-size]
  133 |     stream->dft.buf = (double*)malloc(sizeof(dsp_t) * 0);
      |                       ^

@knro knro merged commit 560a072 into indilib:master May 19, 2024
10 of 11 checks passed
@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented May 19, 2024

Thank @knro you for merging this!

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