From: Jon Medhurst Date: Wed, 9 Apr 2014 15:09:46 +0000 (+0100) Subject: gator-daemon: Fix compilation error: 'sa_family_t' does not name a type X-Git-Tag: firefly_0821_release~3680^2~7^2~2^2~4^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7bf87fba32f5609f0bddcd83c18241d65619b36e;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/tools/gator/daemon/UEvent.cpp b/tools/gator/daemon/UEvent.cpp index 282e965fa67a..d977cd080b40 100644 --- a/tools/gator/daemon/UEvent.cpp +++ b/tools/gator/daemon/UEvent.cpp @@ -8,9 +8,10 @@ #include "UEvent.h" +#include #include #include -#include + #include #include "Logging.h"