BUILD: Missing inclusion header for ssize_t type
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 26 Jun 2024 08:17:09 +0000 (10:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Nov 2024 18:12:33 +0000 (19:12 +0100)
Compilation issue detected as follows by gcc:

In file included from src/ncbuf.c:19:
src/ncbuf.c: In function 'ncb_write_off':
include/haproxy/bug.h:144:10: error: unknown type name 'ssize_t'
  144 |   extern ssize_t write(int, const void *, size_t); \

(cherry picked from commit bc9821fd26b3a118415f579cdfa6e430b03f96da)
Signed-off-by: Willy Tarreau <w@1wt.eu>

include/haproxy/bug.h

index 7db65c0..7d66f55 100644 (file)
@@ -29,6 +29,7 @@
 #define _HAPROXY_BUG_H
 
 #include <stddef.h>
+#include <sys/types.h>
 #include <haproxy/atomic.h>
 #include <haproxy/compiler.h>