aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-30 12:13:36 +0100
committerHarald Welte <laforge@osmocom.org>2020-12-30 12:13:56 +0100
commit8a33528854dacac511d3d8a8959d6e917698318e (patch)
treeee0f7dae4eb9107750eafb22b01a07fc76700666
parent00c1f91ed795c643fcb2c71fe22819d702a57fb3 (diff)
gbproxy: Fix build on Deiban 8
[ 258s] CC gb_proxy.o [ 258s] gb_proxy.c: In function 'gbproxy_select_sgsn_bvc': [ 258s] gb_proxy.c:293:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode [ 258s] for (int i = 0; i < ARRAY_SIZE(cell->sgsn_bvc); i++) { [ 258s] ^ [ 258s] gb_proxy.c:293:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code Change-Id: I717410b11f1ee38d49e9ca5af593cb59a244ae0a
-rw-r--r--src/gbproxy/gb_proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 7e9d9c330..d86c6ae9b 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -282,6 +282,7 @@ static struct gbproxy_bvc *gbproxy_select_sgsn_bvc(struct gbproxy_config *cfg, s
{
struct gbproxy_sgsn *sgsn;
struct gbproxy_bvc *sgsn_bvc = NULL;
+ int i;
sgsn = gbproxy_select_sgsn(cfg, tlli);
if (!sgsn) {
@@ -290,7 +291,7 @@ static struct gbproxy_bvc *gbproxy_select_sgsn_bvc(struct gbproxy_config *cfg, s
}
/* Get the BVC for this SGSN/NSE */
- for (int i = 0; i < ARRAY_SIZE(cell->sgsn_bvc); i++) {
+ for (i = 0; i < ARRAY_SIZE(cell->sgsn_bvc); i++) {
sgsn_bvc = cell->sgsn_bvc[i];
if (!sgsn_bvc)
continue;