~bigbes/tarantool-protobuf: 956bf2a2

c-accel: fix strdup on glibc with -std=c99

strdup is POSIX, not ISO C99, so glibc's <string.h> only exposes it when
_POSIX_C_SOURCE >= 200809. With -std=c99 (strict mode) gcc otherwise
treats strdup as an implicit-int function, which on 64-bit Linux
truncates the returned pointer to int and yields warnings + likely
crashes. macOS happens to declare strdup unconditionally so the issue
only surfaces on the srht.bigb.es Ubuntu builder.

Define _POSIX_C_SOURCE at the top of c_runtime.c before any include.

Eugene Blikh <bigbes@gmail.com> — 2026-05-19 10:18:11 UTC

Commit 956bf2a2a4baf60a231a5e0377b418860a47cd32view raw patch

Parent(s): 52e47523

1 changed file(s)

FileStatus+
runtime/pb/c/c_runtime.c M +6