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

pre gcc v5 support and allow building without dbengine #14239

Merged
merged 2 commits into from Jan 10, 2023

Conversation

ktsaou
Copy link
Member

@ktsaou ktsaou commented Jan 10, 2023

gcc versions prior to 5 do not allow initializing static members/variables with this expression:

#define NETDATA_SPINLOCK_INITIALIZER (SPINLOCK){ .locked = false, }

They throw a message that the above is not a constant initializer. But they accept the same without the cast:

#define NETDATA_SPINLOCK_INITIALIZER { .locked = false, }

This PR changes the code to allow compiling with gcc versions prior to 5.

Also, global statistics fail when dbengine is not enabled. This PR fixes that too.

@ktsaou ktsaou changed the title pre gcc v5 support and allow building with dbengine pre gcc v5 support and allow building without dbengine Jan 10, 2023
@ktsaou ktsaou merged commit 5a815ea into netdata:master Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant