From 50c5e58dcdcf6378fa1fba3b0c1bbfa741d81b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 6 Aug 2021 09:43:18 +0300 Subject: [PATCH] better fcntl64 hack this file may be included from the assembler; assembler does not understand the `__asm__` directive. --- toolchain/defs.bzl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index e0b8dce..f92be8e 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -27,7 +27,13 @@ GLIBC_2.2.5 { fcntl; }; """ -_fcntl_h = """__asm__(".symver fcntl64, fcntl@GLIBC_2.2.5");\n""" +_fcntl_h = """ +#ifdef __ASSEMBLER__ +.symver fcntl64, fcntl@GLIBC_2.2.5 +#else +__asm__(".symver fcntl64, fcntl@GLIBC_2.2.5"); +#endif +""" # Zig supports even older glibcs than defined below, but we have tested only # down to 2.17.