armel_ftbfs

This commit is contained in:
gregor herrmann 2014-04-02 13:07:40 +01:00 committed by Barak A. Pearlmutter
parent 6481f82250
commit 93d83c7553
2 changed files with 7 additions and 4 deletions

View File

@ -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;

View File

@ -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 <sys/user.h>
* 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();