From 50d16b16ca4724373e02edffdfe08709dae52450 Mon Sep 17 00:00:00 2001 From: quocbao Date: Mon, 20 Feb 2023 14:39:18 +0700 Subject: [PATCH] Compile in C99 mode src/websocket.c:247:2: error: 'for' loop initial declarations are only allowed in C99 mode for(int i = 0; p < eom && i < cmd->count; i++) { ^ --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29ebef0..35a7d66 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ CFLAGS ?= -Wall -Wextra -Isrc -Isrc/jansson/src -Isrc/http-parser -MD LDFLAGS ?= -levent -pthread # Pass preprocessor macros to the compile invocation -CFLAGS += $(CPPFLAGS) +CFLAGS += $(CPPFLAGS) -std=gnu99 # check for MessagePack MSGPACK_LIB=$(shell ls /usr/lib/libmsgpack.so 2>/dev/null)