From f6477cb97d5494ee86408b92f257ee253fda7bbe Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Mon, 17 Aug 2026 18:38:12 +0900 Subject: [PATCH] test: the unit build takes the dialect the daemon is built with 9c compiles with -std=gnu11 and UNIT_CFLAGS overrode that with -std=c99, so the tests built the daemon's own sources under a dialect the daemon never sees. Under it glibc hides lstat, and server_test.c reaches before srv.c pulls in u.h -- it must, since thread.h defines recv as chanrecv and the socket recv it calls has to be declared first. So make all was green while make check would not compile. HOST_CFLAGS keeps -std=c99: those are host programs with no Plan 9 headers. Co-Authored-By: Claude Opus 5 (1M context) --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 06af136..e48c9aa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -4,7 +4,7 @@ HOSTCC = cc PKG_CONFIG ?= pkg-config CFLAGS ?= -O2 -g UNIT_CPPFLAGS = -I.. -UNIT_CFLAGS = -std=c99 -Wall -Wextra +UNIT_CFLAGS = -Wall -Wextra HOST_CFLAGS = -std=c99 -Wall -Wextra TEXT_CFLAGS = $(shell $(PKG_CONFIG) --cflags pangocairo cairo fontconfig) TEXT_LIBS = $(shell $(PKG_CONFIG) --libs pangocairo cairo fontconfig)