diff options
authorJon Medhurst2014-04-09 10:09:46 -0500
committerJon Medhurst2014-04-09 10:11:46 -0500
commitb7d5d4453493920a30a4a872cefa6daeaa3fb925 (patch)
parente0368a544a576b2cedd65e87324716060dd24efa (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 <>
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/UEvent.cpp b/daemon/UEvent.cpp
index 282e965..d977cd0 100644
--- a/daemon/UEvent.cpp
+++ b/daemon/UEvent.cpp
@@ -8,9 +8,10 @@
8 8
9#include "UEvent.h" 9#include "UEvent.h"
10 10
11#include <sys/socket.h>
11#include <linux/netlink.h> 12#include <linux/netlink.h>
12#include <string.h> 13#include <string.h>
13#include <sys/socket.h> 14
14#include <unistd.h> 15#include <unistd.h>
15 16
16#include "Logging.h" 17#include "Logging.h"