From 93d83c7553abf9ee9e966cc499c7bafb73af6fc0 Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Wed, 2 Apr 2014 13:07:40 +0100 Subject: [PATCH] armel_ftbfs --- src/user.c | 4 ++-- src/user.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/user.c b/src/user.c index f5ad924..1da7344 100644 --- a/src/user.c +++ b/src/user.c @@ -33,7 +33,7 @@ #include "encoding.h" #include "user.h" -struct tun_user *users; +struct _user *users; unsigned usercount; int @@ -59,7 +59,7 @@ init_users(in_addr_t my_ip, int netbits) maxusers = (1 << (32-netbits)) - 3; /* 3: Net addr, broadcast addr, iodined addr */ usercount = MIN(maxusers, USERS); - users = calloc(usercount, sizeof(struct tun_user)); + users = calloc(usercount, sizeof(struct _user)); for (i = 0; i < usercount; i++) { in_addr_t ip; users[i].id = i; diff --git a/src/user.h b/src/user.h index 7d02b65..2787fad 100644 --- a/src/user.h +++ b/src/user.h @@ -33,7 +33,10 @@ #define QMEMDATA_LEN 15 /* Max advisable: 36/2 = 18. Total mem usage: QMEMDATA_LEN * USERS * 6 bytes */ -struct tun_user { +/* Renamed to struct _user to avoid naming conflict with struct user found in + * which gets included in some builds (armel) */ + +struct _user { char id; int active; int disabled; @@ -73,7 +76,7 @@ struct tun_user { #endif }; -extern struct tun_user *users; +extern struct _user *users; int init_users(in_addr_t, int); const char* users_get_first_ip();