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
6602a4baf4 (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>
This commit is contained in:
parent
15ce78dafc
commit
7bf87fba32
1 changed files with 2 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue