void-packages/srcpkgs/pahole/patches/fix_sysconf.patch
Andrew Benson 031a251762 New package: pahole-1.12
Closes #10100.
2019-04-02 03:37:47 -03:00

16 lines
466 B
Diff

--- dwarves_fprintf.c.orig
+++ dwarves_fprintf.c
@@ -1683,11 +1683,13 @@
void dwarves__fprintf_init(uint16_t user_cacheline_size)
{
if (user_cacheline_size == 0) {
+#ifdef _SC_LEVEL1_DCACHE_LINESIZE
long sys_cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
if (sys_cacheline_size > 0)
cacheline_size = sys_cacheline_size;
else
+#endif
cacheline_size = 64; /* Fall back to a sane value */
} else
cacheline_size = user_cacheline_size;