base-linux: avoid double define of __always_inline

This patch fixes the following build problem that occurs on recent
GNU/Linux systems:

  /usr/include/x86_64-linux-gnu/sys/cdefs.h:307:0: error: "__always_inline" redefined
  ...
  /usr/include/linux/stddef.h:5:0: note: this is the location of the previous definition

The code in 'cdefs.h' does not check if the '__always_inline' is already
defined. The patch works around the problem by including the 'sys/cdefs.h'
first.
This commit is contained in:
Norman Feske 2018-11-07 13:30:04 +01:00 committed by Christian Helmuth
parent ee91d7339c
commit f93294975b

View File

@ -44,6 +44,7 @@
#define size_t __SIZE_TYPE__
/* Linux includes */
#include <sys/cdefs.h> /* include first to avoid double definition of '__always_inline' */
#include <linux/futex.h>
#include <unistd.h>
#include <signal.h>