summaryrefslogtreecommitdiff
path: root/vapi
diff options
context:
space:
mode:
authorDr. Michael Lauer <mickey@vanille-media.de>2021-05-24 16:50:24 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2021-06-30 14:18:43 +0200
commit7ab2b4402c7073c760b04b297e1db553e6dd1548 (patch)
tree2b4d4d4d5dfac2fd7d1c648f1cfe5632e6f30b2b /vapi
parent59ddcb629d95a9615c6c118852640e3e5f8cb833 (diff)
downloadvala-7ab2b4402c7073c760b04b297e1db553e6dd1548.tar.gz
linux: Substitute linux/if.h with net/if.h
There is an age-old conflict between linux/if.h (the kernel header) and net/if.h (the userland header) that leads to compile errors due to redeclaration of certain network-related structures, see e.g. the following links: - https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/673073 - https://lists.debian.org/debian-kernel/2017/06/msg00003.html - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824442 FWIW, it still seems to be a very current problem which I just stumbled over _again_. By now all the relevant structures should have counterparts in net/if.h, so let's try to just not include the kernel header, but use the userland header instead.
Diffstat (limited to 'vapi')
-rw-r--r--vapi/linux.vapi12
1 files changed, 6 insertions, 6 deletions
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 49e792ea4..b6fd9efa1 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -1418,7 +1418,7 @@ namespace Linux {
namespace Network {
// interface consts, structs, and methods
- [CCode (cname = "IFNAMSIZ", cheader_filename = "sys/socket.h,linux/if.h")]
+ [CCode (cname = "IFNAMSIZ", cheader_filename = "sys/socket.h,net/if.h")]
public const int INTERFACE_NAME_SIZE;
[CCode (cheader_filename = "net/if.h")]
@@ -1428,7 +1428,7 @@ namespace Linux {
[CCode (cheader_filename = "net/if.h")]
public IfNameindex if_nameindex ();
- [CCode (cname = "int", cprefix = "IFF_", has_type_id = false, cheader_filename = "sys/socket.h,linux/if.h")]
+ [CCode (cname = "int", cprefix = "IFF_", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h")]
public enum IfFlag {
UP,
BROADCAST,
@@ -1447,13 +1447,13 @@ namespace Linux {
DYNAMIC
}
- [CCode (cname = "struct if_nameindex", has_type_id = false, cheader_filename = "sys/socket.h,linux/if.h", destroy_function = "if_freenameindex")]
+ [CCode (cname = "struct if_nameindex", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "if_freenameindex")]
public struct IfNameindex {
public uint if_index;
public string if_name;
}
- [CCode (cname = "struct ifmap", has_type_id = false, cheader_filename = "sys/socket.h,linux/if.h", destroy_function = "")]
+ [CCode (cname = "struct ifmap", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "")]
public struct IfMap {
public ulong mem_start;
public ulong mem_end;
@@ -1463,7 +1463,7 @@ namespace Linux {
public uchar port;
}
- [CCode (cname = "struct ifreq", has_type_id = false, cheader_filename = "netinet/in.h,linux/if.h", destroy_function = "")]
+ [CCode (cname = "struct ifreq", has_type_id = false, cheader_filename = "netinet/in.h,net/if.h", destroy_function = "")]
public struct IfReq {
[CCode (array_length = false)]
public char[] ifr_name;
@@ -1484,7 +1484,7 @@ namespace Linux {
public char[] ifr_newname;
}
- [CCode (cname = "struct ifconf", has_type_id = false, cheader_filename = "sys/socket.h,linux/if.h", destroy_function = "")]
+ [CCode (cname = "struct ifconf", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "")]
public struct IfConf {
public int ifc_len;
public string ifc_buf;