mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-02 18:22:04 +00:00
BUILD: buffers: buf.h requires unistd to get ssize_t on libmusl
Building with musl and gcc-5.3 for MIPS returns this : include/common/buf.h: In function 'b_dist': include/common/buf.h:252:2: error: unknown type name 'ssize_t' ssize_t dist = to - from; ^ Including stdint or stddef is not sufficient there to get ssize_t, unistd is needed as well. It's likely that other platforms will have the same issue. This patch also addresses it in ist.h and memory.h.
This commit is contained in:
parent
6689609090
commit
a7280a1ec2
@ -30,6 +30,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Structure defining a buffer's head */
|
||||
struct buffer {
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <common/config.h>
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <common/config.h>
|
||||
#include <common/mini-clist.h>
|
||||
|
@ -440,10 +440,10 @@ static inline void htx_dump(struct htx *htx)
|
||||
{
|
||||
int32_t pos;
|
||||
|
||||
fprintf(stderr, "htx:%p [ size=%u - data=%u - used=%u - wrap=%s - extra=%lu]\n",
|
||||
fprintf(stderr, "htx:%p [ size=%u - data=%u - used=%u - wrap=%s - extra=%llu]\n",
|
||||
htx, htx->size, htx->data, htx->used,
|
||||
(!htx->used || htx->tail+1 == htx->wrap) ? "NO" : "YES",
|
||||
(unsigned long)htx->extra);
|
||||
(unsigned long long)htx->extra);
|
||||
fprintf(stderr, "\thead=%d - tail=%u - front=%u - wrap=%u\n",
|
||||
htx_get_head(htx), htx->tail, htx->front, htx->wrap);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user