Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf6a7e3f authored by Dmitrijs Ledkovs's avatar Dmitrijs Ledkovs Committed by Steve Kondik
Browse files

Fix failure to build from source with modern _host_ glibc/gcc.



One should not define __USE_GNU directly, and instead _GNU_SOURCE
should be defined as early as possible, before first (indirect)
inclusion of features.h

Change-Id: I4d109d4fa0c3d266b873d2a0a66a52e1a4faa234
Signed-off-by: default avatarDmitrijs Ledkovs <dmitrijs.ledkovs@canonical.com>
parent 5311bbd2
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -18,6 +18,12 @@
 * Backtracing functions for x86.
 */

#ifndef __BIONIC__
// glibc has its own renaming of the Linux kernel's structures.
#define _GNU_SOURCE // For REG_EBP, REG_ESP, and REG_EIP.
#include <ucontext.h>
#endif

#define LOG_TAG "Corkscrew"
//#define LOG_NDEBUG 0

@@ -75,12 +81,6 @@ typedef struct ucontext {

#endif /* __BIONIC_HAVE_UCONTEXT_T */

#else /* __BIONIC__ */

// glibc has its own renaming of the Linux kernel's structures.
#define __USE_GNU // For REG_EBP, REG_ESP, and REG_EIP.
#include <ucontext.h>

#endif /* __ BIONIC__ */

/* Unwind state. */