From: Tomas Mraz Date: Mon, 28 Apr 2025 14:00:32 +0000 (+0200) Subject: sslecho: Rename bool to flag to avoid C23 conflict X-Git-Tag: openssl-3.2.5~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f9aaf3397a52ad77ca35f460a1520373ce3eb1f;p=thirdparty%2Fopenssl.git sslecho: Rename bool to flag to avoid C23 conflict Fixes #27516 Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/27519) (cherry picked from commit 81ce3d3ae8f6c4021e0dce86891e869efa1710db) --- diff --git a/demos/sslecho/main.c b/demos/sslecho/main.c index 3dbbe04459a..1c7f1880413 100644 --- a/demos/sslecho/main.c +++ b/demos/sslecho/main.c @@ -19,7 +19,7 @@ static const int server_port = 4433; -typedef unsigned char bool; +typedef unsigned char flag; #define true 1 #define false 0 @@ -27,9 +27,9 @@ typedef unsigned char bool; * This flag won't be useful until both accept/read (TCP & SSL) methods * can be called with a timeout. TBD. */ -static volatile bool server_running = true; +static volatile flag server_running = true; -int create_socket(bool isServer) +int create_socket(flag isServer) { int s; int optval = 1; @@ -67,7 +67,7 @@ int create_socket(bool isServer) return s; } -SSL_CTX* create_context(bool isServer) +SSL_CTX *create_context(flag isServer) { const SSL_METHOD *method; SSL_CTX *ctx; @@ -130,7 +130,7 @@ void usage(void) int main(int argc, char **argv) { - bool isServer; + flag isServer; int result; SSL_CTX *ssl_ctx = NULL;