mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user