mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-28 12:35:13 +00:00
armel_ftbfs
This commit is contained in:
parent
6481f82250
commit
93d83c7553
@ -33,7 +33,7 @@
|
|||||||
#include "encoding.h"
|
#include "encoding.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
struct tun_user *users;
|
struct _user *users;
|
||||||
unsigned usercount;
|
unsigned usercount;
|
||||||
|
|
||||||
int
|
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 */
|
maxusers = (1 << (32-netbits)) - 3; /* 3: Net addr, broadcast addr, iodined addr */
|
||||||
usercount = MIN(maxusers, USERS);
|
usercount = MIN(maxusers, USERS);
|
||||||
|
|
||||||
users = calloc(usercount, sizeof(struct tun_user));
|
users = calloc(usercount, sizeof(struct _user));
|
||||||
for (i = 0; i < usercount; i++) {
|
for (i = 0; i < usercount; i++) {
|
||||||
in_addr_t ip;
|
in_addr_t ip;
|
||||||
users[i].id = i;
|
users[i].id = i;
|
||||||
|
@ -33,7 +33,10 @@
|
|||||||
#define QMEMDATA_LEN 15
|
#define QMEMDATA_LEN 15
|
||||||
/* Max advisable: 36/2 = 18. Total mem usage: QMEMDATA_LEN * USERS * 6 bytes */
|
/* 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;
|
char id;
|
||||||
int active;
|
int active;
|
||||||
int disabled;
|
int disabled;
|
||||||
@ -73,7 +76,7 @@ struct tun_user {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct tun_user *users;
|
extern struct _user *users;
|
||||||
|
|
||||||
int init_users(in_addr_t, int);
|
int init_users(in_addr_t, int);
|
||||||
const char* users_get_first_ip();
|
const char* users_get_first_ip();
|
||||||
|
Loading…
Reference in New Issue
Block a user