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

Disabling C99 breaks build with shared-session-cache enabled #173

Closed
ghost opened this issue Mar 20, 2017 · 3 comments
Closed

Disabling C99 breaks build with shared-session-cache enabled #173

ghost opened this issue Mar 20, 2017 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Mar 20, 2017

The following change seems to break building up the current git-master
668c7c0

configuration.c: In function ‘config_new’: configuration.c:208:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0 ; i < MAX_SHCUPD_PEERS; i++) ^ configuration.c:208:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

@dridi
Copy link
Member

dridi commented Mar 20, 2017

As a workaround, does it work if you configure hitch like this?

./configure CFLAGS='-g -O2 -std=c99'

I don't remember which platform+compiler broke when the flag was present, what's yours?

@ghost
Copy link
Author

ghost commented Mar 20, 2017

well, the build host is mostly Debian (Jessie) with GCC. Adding flag '-std=c99' does fix this.

$ gcc -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.9.2 (Debian 4.9.2-10)

@dridi dridi self-assigned this Mar 20, 2017
@dridi
Copy link
Member

dridi commented Mar 20, 2017

Thanks for the details, please use the workaround until a fix lands.

@daghf daghf closed this as completed in 3b0d278 May 5, 2017
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

No branches or pull requests

1 participant