Skip to content

Commit b300db5

Browse files
committed
BUILD: compiler: define __builtin_prefetch() for tcc
We're using a few occurrences of __builtin_prefetch() but tcc doesn't know about it so let's give it a dummy definition. Now the code builds and works again with tcc without thread support.
1 parent 033db09 commit b300db5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/haproxy/compiler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@
264264
#endif
265265
#endif
266266

267+
/* Define the missing __builtin_prefetch() for tcc. */
268+
#if defined(__TINYC__)
269+
#define __builtin_prefetch(addr, ...) do { } while (0)
270+
#endif
271+
267272
#ifndef __GNUC_PREREQ__
268273
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
269274
#define __GNUC_PREREQ__(ma, mi) \

0 commit comments

Comments
 (0)