mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
On Ubuntu 20.04 when builiding dpkg packages, even when cross-compiling firmware, gcc stack smashing protection is enabled. Let's provide what is minimally required in order to sucessfully complete builds on such platforms. Change-Id: Ic2f68f16b0730e7b5db17c30effc29a2909d1997 Closes: OS#4687
15 lines
383 B
C
15 lines
383 B
C
#include <stdint.h>
|
|
#include <osmocom/core/panic.h>
|
|
|
|
/* This is what's minimally required to fix builds on Ubuntu 20.04,
|
|
* where stack smashing protection is enabled by default when using dpkg
|
|
* - even when cross-compiling: https://osmocom.org/issues/4687
|
|
*/
|
|
|
|
uintptr_t __stack_chk_guard = 0xdeadbeef;
|
|
|
|
void __stack_chk_fail(void)
|
|
{
|
|
osmo_panic("Stack smashing detected!\r\n");
|
|
}
|