diff options
author | Jon Medhurst <tixy@linaro.org> | 2014-04-09 16:09:46 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2014-04-10 09:06:54 +0100 |
commit | 0454760001a3253b67353012acb3e391a1521fac (patch) | |
tree | 23937f3e5c3310ca2f4a6cb35d1738907fd6262e /tools | |
parent | 40eee854685d3edb422e8cfc1b6ae2252853dff9 (diff) |
gator-daemon: Fix compilation error: 'sa_family_t' does not name a type
When compiling on Linaro Android we get the following error:
bionic/libc/kernel/common/linux/netlink.h:52:2: error: 'sa_family_t' does not name a type
sa_family_t nl_family;
This is related to an issue that was fixed in Linux 3.1 by commit
6602a4baf4d1a73c (net: Make userland include of netlink.h more sane)
but it seems that the Linux headers used by bionic predate that.
Fortunately, the fix for us is simple: reorder the header file includes
so that the definition of sa_family_t from sys/socket.h is picked up
before being used by linux/netlink.h
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gator/daemon/UEvent.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gator/daemon/UEvent.cpp b/tools/gator/daemon/UEvent.cpp index 282e965fa67..d977cd080b4 100644 --- a/tools/gator/daemon/UEvent.cpp +++ b/tools/gator/daemon/UEvent.cpp @@ -8,9 +8,10 @@ #include "UEvent.h" +#include <sys/socket.h> #include <linux/netlink.h> #include <string.h> -#include <sys/socket.h> + #include <unistd.h> #include "Logging.h" |