coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

Compile time error using sessgarden #413

Closed speedj closed 6 years ago

speedj commented 6 years ago

I hit a compile time error using git cloned sources (yesterday) using ./configure --enable-gardenext --enable-sessgarden

It seems an indentation warning being treated as an error and a line commented as error compiling in the source code.

Any suggestions? Is it safe to simply remove this line?

Relevant error lines follows:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../json -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF=\"/usr/local/etc/chilli.conf\" -DDEFPIDFILE=\"/usr/local/var/run/chilli.pid\" -DDEFSTATEDIR=\"/usr/local/var/run\" -DSBINDIR=\"/usr/local/sbin\" -g -O2 -MT garden.lo -MD -MP -MF .deps/garden.Tpo -c garden.c -fPIC -DPIC -o .libs/garden.o garden.c: In function ‘garden_print_appconn’: garden.c:77:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (!safe_write(fd, line, strlen(line))) / error /; ^~ garden.c:83:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ garden_print_list(fd, ^~~~~ cc1: all warnings being treated as errors Makefile:938: recipe for target 'garden.lo' failed make[3]: [garden.lo] Error 1 make[3]: Leaving directory '/usr/local/src/coova-chilli-1.4/src' Makefile:981: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/usr/local/src/coova-chilli-1.4/src' Makefile:417: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/coova-chilli-1.4' Makefile:345: recipe for target 'all' failed make: [all] Error 2

xOneca commented 6 years ago

Don't remove any line. Just try removing two spaces from the beginning of line 83.

speedj commented 6 years ago

It works! Thanks!