Commit 7c11d57a by Stéphane Graber

Replace all reference to ushort by unsigned short

ushort appears to be a glibc specific type which doesn't exist in bionic, this commit simply replace all occurences by the equivalent unsigned short type. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 8aa4885c
......@@ -87,8 +87,8 @@ struct ifla_veth {
struct ifla_vlan {
uint flags;
uint fmask;
ushort vid;
ushort pad;
unsigned short vid;
unsigned short pad;
};
struct ifla_macvlan {
......
......@@ -413,7 +413,7 @@ out:
}
/* XXX: merge with lxc_macvlan_create */
int lxc_vlan_create(const char *master, const char *name, ushort vlanid)
int lxc_vlan_create(const char *master, const char *name, unsigned short vlanid)
{
struct nl_handler nlh;
struct nlmsg *nlmsg = NULL, *answer = NULL;
......
......@@ -61,7 +61,7 @@ extern int lxc_netdev_set_mtu(const char *name, int mtu);
*/
extern int lxc_veth_create(const char *name1, const char *name2);
extern int lxc_macvlan_create(const char *master, const char *name, int mode);
extern int lxc_vlan_create(const char *master, const char *name, ushort vid);
extern int lxc_vlan_create(const char *master, const char *name, unsigned short vid);
/*
* Activate forwarding
......
......@@ -79,7 +79,7 @@ extern int nla_put_u32(struct nlmsg *nlmsg, int attr, int value)
return nla_put(nlmsg, attr, &value, sizeof(value));
}
extern int nla_put_u16(struct nlmsg *nlmsg, int attr, ushort value)
extern int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value)
{
return nla_put(nlmsg, attr, &value, 2);
}
......
......@@ -169,7 +169,7 @@ int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
*
* Returns 0 on success, < 0 otherwise
*/
int nla_put_u16(struct nlmsg *nlmsg, int attr, ushort value);
int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value);
/*
* nla_put_attr: add an attribute name to a netlink
......
......@@ -149,7 +149,7 @@ extern int lxc_setup_fs(void)
}
/* borrowed from iproute2 */
extern int get_u16(ushort *val, const char *arg, int base)
extern int get_u16(unsigned short *val, const char *arg, int base)
{
unsigned long res;
char *ptr;
......
......@@ -25,7 +25,7 @@
extern int lxc_copy_file(const char *src, const char *dst);
extern int lxc_setup_fs(void);
extern int get_u16(ushort *val, const char *arg, int base);
extern int get_u16(unsigned short *val, const char *arg, int base);
extern int mkdir_p(const char *dir, mode_t mode);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment