]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
sslecho: Rename bool to flag to avoid C23 conflict
authorTomas Mraz <tomas@openssl.org>
Mon, 28 Apr 2025 14:00:32 +0000 (16:00 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 30 Apr 2025 09:50:23 +0000 (11:50 +0200)
Fixes #27516

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27519)

(cherry picked from commit 81ce3d3ae8f6c4021e0dce86891e869efa1710db)

demos/sslecho/main.c

index 3114dcfcde708807839b73ea16189d3bf124e0e5..b5c9e605e34aeb88f38bcd283c621937b652a809 100644 (file)
@@ -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;